我有一个XML
文件:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<ProgressBar
android:id="@+id/progressbar"
style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|center_horizontal"
android:visibility="visible" />
<WebView
android:id="@+id/web_engine"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:visibility="gone" />
</LinearLayout>
我希望 ProgressBar
的样式为 Large
,并且在屏幕垂直和水平方向上居中... 当我将 layout_width
和 height
设置为fill_parent
时,它会使整个加载图标的大小增加到整个屏幕大小... 我该如何让布局适应整个屏幕并将实际加载图标居中显示?