Dialog dialog=new Dialog(this,R.style.dialog);
dialog.getWindow().requestFeature(Window.FEATURE_NO_TITLE);
dialog.setContentView(R.layout.loading_dialog);
dialog.setCanceledOnTouchOutside(false);
dialog.show();
styles.xml
??????? @android:color/transparent
???
布局
??? android:layout_width="match_parent"
??? android:layout_height="match_parent"
??? android:gravity="center"
??? android:background="#90000000"
??? android:orientation="vertical" >
???
??????? android:layout_width="220dp"
??????? android:padding="20dp"
??????? android:gravity="center"
??????? android:layout_height="wrap_content"
??????? android:orientation="vertical" >
???????
??????????? android:id="@+id/progressBar1"
??????????? style="?android:attr/progressBarStyle"
??????????? android:layout_width="wrap_content"
??????????? android:layout_height="wrap_content" />
???????
??????????? android:layout_marginTop="10dp"
??????????? android:textSize="20dp"
??????????? android:id="@+id/textView1"
??????????? android:layout_width="wrap_content"
??????????? android:layout_height="wrap_content"
??????????? android:text="正在查询..." />
???
?