andineupert andineupert - 8 days ago 7
Android Question

Android DialogPreference Layout TextSize

I'm using a PreferenceScreen with some different preferences. I'm also using a custom preference extending DialogPreference. Now the fontsize of the custom DialogPreference is different than the font size of the other preferences. I tried to apply a style to the preference activity but I just reached that all fonts got the same size (title and summary).

Is there another way to let all preferences look the same way?
Thanks!

(I took a look at a view other questions to DialogPreferences but I could not find a solution for this, so I hope this isn't too redundant)

Mel Mel
Answer

Try using the predefined Android styles in your custom preference. For example, use

@android:style/TextAppearance.Medium

for normal TextViews, and

@android:style/TextAppearance.Large

four your heading TextViews.