I'd like to be able to customize the view of a PreferenceScreen
, and so I'm interested in knowing how to set a style for it.
views:
34answers:
1
A:
I wouldn't recommend it but you can start extending all the preference's classes (DialogPreference
, CheckboxPreference
, etc) and create your own widgets with the style you want.
Macarse
2010-09-01 12:19:50
I'm interested only in the PreferenceScreen . I'd like to increase the font size for the text that the PreferenceScreen displays it (the one speficied in the android:title tag)
rantravee
2010-09-01 12:31:33
@klaus-vlad did you try extending it and changing that through the code?
Macarse
2010-09-01 12:40:15
Could you point me exactly where the modifications should be made ?
rantravee
2010-09-01 12:55:35
@klaus-vlad: Never did it myself, but that's what I would try. Sorry.
Macarse
2010-09-01 13:12:01
ok, thanks though !
rantravee
2010-09-01 13:21:08
PreferenceScreen class is final and cannot be extended
rantravee
2010-09-01 14:26:09
@klaus-vlad: oh, that's bad. It also doesn't have any method for what you are trying to do :(
Macarse
2010-09-01 14:30:25
What I've tried is to use the android:layout attribute to set a different layout. The layout I've tried to set is actually the android original layout with the not public resources removed and the textAppereance atribute value modified. The problem is that with this approach the widget and the summery of the preference screen are lost.
rantravee
2010-09-01 14:45:26