删除警报对话框边界在我的应用我使用与圆角矩形的警告对话框theme.But它有alertdialog矩形和我theme.My问题是如何取代像dialog.I警告对话框边界只想用自己的主题来显示这个设置项目。
我想输出这种方式,取代上述主题:
主要活动:
AlertDialog.Builder alertSeverity = new AlertDialog.Builder(
getActivity(), R.style.Theme_CustomDialog);
alertSeverity.setTitle("Severity Status");
CharSequence[] severityStatus = { "Low-Severity",
"Middle-Severity", "High-Severity" };
alertSeverity.setItems(severityStatus,
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
});
我的主题:
<style name="Theme.CustomDialog" parent="android:style/Theme.Dialog">
<item name="android:windowBackground">@drawable/shapedialogtheme</item>
<item name="android:windowFrame">@null</item>
</style>
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<solid android:color="#565656" />
<stroke
android:width="5dp"
android:color="#ffff8080" />
<corners android:radius="30dp" />
<padding
android:bottom="10dp"
android:left="10dp"
android:right="10dp"
android:top="10dp" />
<size
android:width="150dp"
android:height="150dp"/>
</shape>
ü可以很容易地使通过定制而不是使用主题。 – TheFlash
如何使海关 – Satheesh
等待我要去邮编。 – TheFlash