我在我的应用中使用对话框。但我想更改对话框标题的颜色。我该怎么办呢谢谢......
答案 0 :(得分:0)
您可以尝试扩展默认主题并在活动中使用它。您需要扩展Theme.Dialog样式。找到示例here
答案 1 :(得分:0)
如果您使用AlertDialog
,则可以使用setCustomTitle(View)
功能(也在Builder中)。
答案 2 :(得分:-1)
你可以创建一个xml作为你的愿望..然后在对话框中膨胀布局..
LayoutInflater factory2 = LayoutInflater.from(this);
final View coloredChangedView= factory2.inflate(R.layout.my_layout, null);
//do other things...
.setView(coloredChangedView);
这样你可以自定义你的对话..