如何更改列表项的文字颜色在AlertDialog [英] How do you change the textcolor of the list items in an AlertDialog

查看:389
本文介绍了如何更改列表项的文字颜色在AlertDialog的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我试图改变的项目的文本颜色在列表上的目录preference 弹出窗口。我花了一个多小时寻找通过所有的各种风格的名字,但我无法找到 TextAppearance 或任何进入这个特殊的文本。感谢您的帮助!

Hello I am trying to change the text color of the items in a list on a ListPreference pop up window. I have spent over an hour looking through all of the various style names but I can't find TextAppearance or anything that goes to this particular text. Thanks for your help!

推荐答案

您不能,你不应该。 * preference 使用从 com.android.internal.R.styleable 的风格可能由制造商进行更改。使用默认的的想法是,在设备的每一个preference屏幕看上去都差不多。

You can't and you shouldn't. *Preference uses styles from com.android.internal.R.styleable which might be changed by manufactures. The idea of using the default ones is that every preference screen in your device look alike.

在另一方面,你可以尝试做一个活动安卓主题=@安卓风格/ Theme.Dialog在你的应用程序的 AndroidManifest 并放置一个的ListView 的风格,只要你想。

On the other hand you can try doing an Activity with android:theme="@android:style/Theme.Dialog" in your app's AndroidManifest and place a ListView styled as you want.

这篇关于如何更改列表项的文字颜色在AlertDialog的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆