Android的对话框透明
问题描述:
我想摆脱的边界在我的对话框,使它看起来是绝对透明的,仿佛影像出现在屏幕的顶部。
I want to get rid of the border in my dialog box and make it look absolutly transparent, as if the image is on the top of screen.
我的对话XML是 -
My dialog xml is -
<?xml version="1.0" encoding="utf-8"?>
<ImageView android:id="@+id/ImageView01"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_centerHorizontal="true" android:visibility="invisible"/>
答
尝试下面code
Dialog mDialog = new Dialog(mContext, android.R.style.Theme_Translucent_NoTitleBar_Fullscreen);