<?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