vector Android 控件中如何使用矢量图
alertdialog如何消除黑色背景及黑色边框
dialog显示后window窗体创建完成,将布局设置到窗体
AlertDialog dialog = new AlertDialog.Builder(activity).create();dialog.show();
View contentView = LayoutInflater.from(activity).inflate(R.layout.progress_bar, null, false);
dialog.getWindow().setContentView(contentView);
<?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/transparent"> <ProgressBar android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:background="@color/white" android:padding="10dp" /> </FrameLayout>