我已经检查了几种可能性,根据我的经验,这项任务的最佳选择是:
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
android:id="@+id/progressbar"
style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:visibility="visible" />
android:id="@+id/web_engine"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:visibility="gone" />
我使用RelativeLayout与android:layout_centerInParent =“true”,它比LinearLayout更好.
干杯