Android AlertDialog去除白色边框代码使用样式文件,在values 目录下新建styles.xml文件,编写如上代码:?
Android AlertDialog去除白色边框代码
使用样式文件,在values 目录下新建styles.xml文件,编写如上代码:?
=================================
?
调用时,使用AlerDialog的接口类,Dialog 接口编写如下代码:
?
?
public Dialog(Context context, int theme) { mContext = new ContextThemeWrapper( context, theme == 0 ? com.android.internal.R.style.Theme_Dialog : theme); mWindowManager = (WindowManager)context.getSystemService("window"); Window w = PolicyManager.makeNewWindow(mContext); mWindow = w; w.setCallback(this); w.setWindowManager(mWindowManager, null, null); w.setGravity(Gravity.CENTER); mUiThread = Thread.currentThread(); mDismissCancelHandler = new DismissCancelHandler(this); }?
