<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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/progressBar1"
style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_centerInParent="true" />
<WebView
android:id="@+id/webview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="@+id/progressBar1"
/>
</RelativeLayout>
這可行,但它將整個頁面向下移動到中間並用黑色背景替換它。我的意思是它在頁面中間顯示不是內容。內容被推下。頁面中間的中心進度條?
我想你想要的是一個'ProgressDialog'。 –
你可以使用[ProgressDialog](https://developer.android.com/reference/android/app/ProgressDialog.html) –
刪除這個'android:layout_below =「@ + id/progressBar1」'並按照@Reena的回答! – Piyush