变化的背景下,AlertDialog的文字颜色 [英] Change background, textcolor of AlertDialog
问题描述
我试图改变的背景和文字颜色 AlertDialog的。
windowTitleStyle
:但是我可以改变标题的唯一颜色的android
活动: AlertDialog.Builder ADB =新AlertDialog.Builder(新ContextThemeWrapper(这一点,R.style.AlertDialogCustom));
样式名称=AlertDialogCustom父=Holo.Theme.Sherlock
我该怎么办呢?谢谢你。
adb.setMessage(Html.fromHtml(<字体颜色=#FF0000>< B>约翰:< / b>< / FONT>+你好吗))?
这是改变文字颜色
你可以创建你自己的对话框
检查此链接
的http://www.helloandroid.com/tutorials/how-display-custom-dialog-your-android-application
http://developer.android.com/guide/topics/ui/ dialogs.html
I try to change background and textcolor of AlertDialog.
But I can change only color of title with android:windowTitleStyle
Activity:
AlertDialog.Builder adb = new AlertDialog.Builder(new ContextThemeWrapper(this, R.style.AlertDialogCustom));
styles.xml
style name="AlertDialogCustom" parent="Holo.Theme.Sherlock"
How can I do that? Thanks.
adb.setMessage(Html.fromHtml("<font color='#FF0000'><b>John:</b></font>"+"How are you?"))
this is for changing text color You can create you own dialog box check this link http://www.helloandroid.com/tutorials/how-display-custom-dialog-your-android-application
http://developer.android.com/guide/topics/ui/dialogs.html
这篇关于变化的背景下,AlertDialog的文字颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!