0

I am working on an android project.

I have a tabbed page and the title of the pages are very big. What i want to do is to decrease font size by changing values in styles.xml

do you know if it is possible ?

The project is written with Xamarin, so i want to avoid to write some specific code, like renderers.

Thanks a lot

Bob5421
  • 7,757
  • 14
  • 81
  • 175

1 Answers1

11

This is possible styles.xml as follow:

 <style name="FontTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="android:textSize">20sp</item>
        <item name="android:textColor">@color/black</item>
 </style>

use code:

<TextView   
    style="@style/FontTheme"  
    android:layout_marginTop="100dp"  
    android:text="test1"/>
Pugazh
  • 9,453
  • 5
  • 33
  • 54
Jack
  • 111
  • 5
  • I am working on Xamarin, i cannot set style on controls. Is there a way in styles.xml to define a default font size for each kind of UI Component ? Thanks – Bob5421 Jun 06 '17 at 14:01