1 <?xml version="1.0" encoding="utf-8"?> 2 <resources> 3 4 <style name="MyDialogStyle"> 5 <item name="android:windowBackground">@android:color/transparent</item> 6 <item name="android:windowFrame">@null</item> 7 <item name="android:windowNoTitle">true</item> 8 <item name="android:windowIsFloating">true</item> 9 <item name="android:windowIsTranslucent">true</item> 10 <item name="android:windowContentOverlay">@null</item> 11 <item name="android:windowAnimationStyle">@android:style/Animation.Dialog</item> 12 <item name="android:backgroundDimEnabled">true</item> 13 </style> 14 15 </resources>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent"> <RelativeLayout android:layout_width="match_parent" android:layout_height="180dp" android:layout_centerInParent="true" android:background="#fff" > <LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:gravity="center" android:orientation="vertical" > <ProgressBar android:id="@+id/progressBar1" style="?android:attr/progressBarStyleLarge" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="10dp" android:text="正在登录" android:textColor="#fff" android:textSize="20sp" /> </LinearLayout> </RelativeLayout> </RelativeLayout>