-4

I am trying to change the text size in a tab and also trying to create some space(padding) in the image from the top.

<style name="MineCustomTabText" parent="TextAppearance.Design.Tab">
<item name="android:textSize">16sp</item>
</style>

and in my tablayout

app:tabTextAppearance="@style/MineCustomTabText"

But it doesn't work

  • bte, for next time.. **add some code please**. Add what you tried, what you failed, what you looked for and the code you are trying to edit. "_create some space in the image from the top_" means all and anything.. – Pier Giorgio Misley Dec 21 '16 at 10:43

2 Answers2

0

you will find how there suggesting for using dimens.xml for different devices of android for Example see Below structure :

res/values/dimens.xml

res/values-small/dimens.xml

res/values-normal/dimens.xml

res/values-large/dimens.xml

res/values-xlarge/dimens.xml
for Example you have used below dimens.xml in values.

<?xml version="1.0" encoding="utf-8"?>
<resources>
   <dimen name="text_size">18sp</dimen>
</resources>
In other values folder you need to change values for your text size 
Surya Prakash Kushawah
  • 3,185
  • 1
  • 22
  • 42
0

Do not use the hard code value for text size. use it like the following

android:text-size="20sp"

for the image part use paddings see this [link]

(http://android4beginners.com/2013/07/lesson-2-2-how-to-use-margins-and-paddings-in-android-layout/)

Pier Giorgio Misley
  • 5,305
  • 4
  • 27
  • 66
Ahmad Arif
  • 53
  • 1
  • 8