Ohh, I want to define a Preference style for Settings module. In this style i only want to change the Preference title and summary's textColor and textSize, different from Frameworks' default style. But Now I have to used the method preference.setLayoutResource() or android:layout for every Preference to realize.
On 11月21日, 上午11时16分, William Ferguson <william.ferguson...@gmail.com> wrote: > I'm pretty certain there is no such style property as > "android:layout". Layout is NOT style. > What are you trying to do? > > William > > On Nov 21, 12:13 pm, Bacon021 <wei.pg...@gmail.com> wrote: > > > > > 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en