tags:

views:

53

answers:

1

Hello

I have xml file that defines some preference screens like the following example

<PreferenceScreen  xmlns:android="http://schemas.android.com/apk/res/android"          
   android:key="root_preferencescreen">

    <PreferenceScreen  android:key="general_sett" android:title="general settings" />
     ....

    <PreferenceScreen  android:key="extras_sett" android:title="extras settings" />

</PreferenceScreen> 

I would like to be able to increase the font size for the text of the preference screen , but because the within a preference screen there is no android:textsize tag , i have no idea how to accomplish that !

+1  A: 

You can make a TextView layout xml that looks something like this:

<TextView xmlns:android="http://schemas.android.com/apk/res/android"
style="?android:attr/listSeparatorTextViewStyle"
android:textColor="@android:color/white"
android:id="@+android:id/title"

/>

and set the layout of your preference category in your preferences.xml like this:

<PreferenceCategory android:title="Category Title"
android:layout="@layout/pref_category"
>

As long as the TextView has the id @+android:id/title you can make the layout look however you want. There is also a way to do this with styles that I haven't quite figured out.

Frank