Sunday, November 20, 2011

[android-developers] Re: how to apply preference style in user-defined theme

My god, Does Google can't give any advice?

On 11月16日, 下午7时54分, Bacon021 <wei.pg...@gmail.com> wrote:
> I defined a theme with an item named "android:preferenceStyle", how
> ever when I apply this theme to some activity, the related preference
> items' style are still not what I defined.
> The following is my style I defined and the usage.
>
> frameworks\base\core\res\res\values\themes.xml:
>
> <style name="CustomActivityTheme">
> <item name="android:windowBackground">@drawable/bg_color</
> item>
> <item name="android:preferenceStyle">@android:style/MyPreference</
> item>
> <item name="android:windowTitleSize">54dip</item>
> </style>
>
> frameworks\base\core\res\res\values\styles.xml:
>
> <style name="MyPreference">
> <item name="android:layout">@android:layout/my_preference_layout</
> item>
> </style>
>
> in CustomActivityTheme, the windowBackground has effect I can change
> the color what I need, but MyPreference won't work, that means the
> layout does't work.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate