【发布时间】:2011-11-04 15:41:32
【问题描述】:
当我运行此代码时,会显示警报对话框,但对话框周围有一个白色边框,而且边框有点圆。我不想要这个白色边框,我想要真正的角为 90 度的角。我希望你明白我想要做什么。
AlertDialog.Builder ad = new AlertDialog.Builder(this);
Button bbb=new Button(MvcnContactList.this);
ad.setView(bbb);
alertDialog = ad.create();
alertDialog.show();
是否有任何方法可以设置警报对话框的样式,但不能设置文本颜色或文本大小或类似的样式...我想设置警报对话框的边框样式,因此仅设置一个主题也许可以解决此问题。但我不知道要覆盖哪些属性。
谢谢,
编辑: 例如,这种样式将 textColor 覆盖为 00FF00 ,这很酷,但是我应该覆盖哪个属性以使角不圆并移除那个白色的钻孔
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AlertDialogCustom" parent="@android:style/AlertDialog">
<item name="android:textColor">#00FF00</item>
<item name="android:typeface">monospace</item>
<item name="android:textSize">10sp</item>
</style>
</resources>
【问题讨论】:
-
这是一个很好的链接,但我没有覆盖边框的属性...
标签: android coding-style dialog themes android-gui