我想更改Alert对话框的背景.我试过以下代码片段:
@android:color/transparent
#659F26
@style/Theme.AlertDialog.Title
@drawable/cab_background_top_example
Java代码:
ContextThemeWrapper ctw = new ContextThemeWrapper( this, R.style.Theme_AlertDialog);
final AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(ctw);
alertDialogBuilder.setTitle(getResources().getString(R.string.confirmation));
alertDialogBuilder.setMessage(getResources().getString(R.string.msg));
alertDialogBuilder.show();
我的应用程序显示如下对话框:
虽然我希望它看起来像:
请建议,我做错了什么.