1
我想要在客户对话框背后的蓝色半透明。但我没有得到蓝色android-透明背景的对话框(任何颜色)
下面是对话声明代码:
final Dialog dialog = new Dialog(BookAppointmentActivity.this,R.style.TranslucentBlue);
//Dialog dialog = new Dialog(BookAppointmentActivity.this, android.R.style.Theme_Translucent_NoTitleBar_Fullscreen);
dialog.setContentView(R.layout.customedialog);
Window window = dialog.getWindow();
window.setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
dialog.show();
这里是我的style.xml
<color name="transparent_green_color">@color/dialog_back</color>
<style name="TranslucentBlue" parent="android:Theme.Translucent">
<item name="android:windowBackground">@color/transparent_green_color</item>
</style>