I like the title bar style from the Android preference category.
In my Activity (not a PreferenceActivity
) How can I use the same style?
Since I just spent the last few hours trying to answer this old question, I'll do it here for anyone else. It turns out the resource the preference category style is using is listSeparatorTextViewStyle.
You use it like this:
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Hello, World"
style="?android:attr/listSeparatorTextViewStyle"/>
Using style="?android:attr/preferenceCategoryStyle"
didn't work.
The main layout is most likely a ScrollView with a LinearLayout. As for the individual layout, I believe (just guessing after looking at the documentation) that you can use the various attributes in android.R.attr - look here: http://developer.android.com/reference/android/R.attr.html. There are attributes like preferenceCategoryStyle, preferenceStyle, etc. You can apply any style to any of your views.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With