本文介绍了嵌套preference屏幕输主题化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个preference屏幕,我的应用程序,并在清单中我已经给它使用一个主题:
I have a preference screen for my application and in the manifest I have given it a theme using:
android:theme="@android:style/Theme.Light.WallpaperSettings"
然而,当我窝在另一个preference屏幕这一块,如:
However when I nest another preference screen inside this one such as:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
android:title="@string/setting_title"
android:key="...">
<PreferenceCategory
android:title="@string/title_themes"
>
<PreferenceScreen
android:title="@string/title_themes_opt"
>
<ListPreference
android:key="Setting_BG"
android:title="@string/setting_bg"
android:summary="@string/setting_bg_summary"
android:entries="@array/bg_titles"
android:defaultValue="0"
android:entryValues="@array/bg_values" />
</PreferenceScreen>
</PreferenceCategory>
</PreferenceScreen>
嵌套的preference屏幕失去父母的主题。这怎么prevented?先谢谢了。
The nested preference screen loses the theme of the parent. How can this be prevented? Thanks in advance.
推荐答案
这是Android的一个bug看到的<一个href="http://$c$c.google.com/p/android/issues/detail?id=4611&can=1&q=$p$pferencescreen%20theme&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars">Bug报告。
This is a bug in android see the Bug Report.
这篇关于嵌套preference屏幕输主题化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!