Change font size of summary in Preference

1.2k views Asked by At

Does anybody know how to change the font size of both title and summary?

If I define my own style and set

<item name="android:textSize">30sp</item>

Both the title and summary are set to this size. I want to make the summary 24sp, but I can't seem to find a way.

1

There are 1 answers

0
groff07 On BEST ANSWER

Try define a different style in the styles.xml and set the first with the textSize 30sp and the second with 24sp

<style name="title">
    <item name="android:textSize">30sp</item>
</style>

<style name="summary">
    <item name="android:textSize">24sp</item>
</style>

and set the style using the lines where you want to use.

style="@style/title"

or

style="@style/summary"

I hope this helps.