Android 我的进度条隐藏在其他布局后面

Android 我的进度条隐藏在其他布局后面,android,Android,我在我的相对布局中包含了一个进度条,但它在布局后面运行。有没有办法我可以把它放在前面显示,它显示当页面加载 [抱歉,我正在粘贴整个XML文件,因为我不知道将进度条放在哪里!因为我是新手,我希望您能帮助我。再次抱歉!] 代码: 行进度条: <?xml version="1.0" encoding="utf-8"?> <ProgressBar xmlns:android="http://schemas.android.com/apk/res/android" andro

我在我的相对布局中包含了一个进度条,但它在布局后面运行。有没有办法我可以把它放在前面显示,它显示当页面加载

[抱歉,我正在粘贴整个XML文件,因为我不知道将进度条放在哪里!因为我是新手,我希望您能帮助我。再次抱歉!]

代码:


行进度条:

<?xml version="1.0" encoding="utf-8"?>
<ProgressBar xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/progress_bar"
    style="?android:attr/progressBarStyle"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_centerInParent="true"
    android:layout_gravity="center"
    android:theme="@style/AppTheme.WhiteAccent"
    android:visibility="gone" />

在之前将包含移动到父布局的末尾。尝试在线性布局之后移动,或在进度条中添加5dp的高程
<?xml version="1.0" encoding="utf-8"?>
<ProgressBar xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/progress_bar"
    style="?android:attr/progressBarStyle"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_centerInParent="true"
    android:layout_gravity="center"
    android:theme="@style/AppTheme.WhiteAccent"
    android:visibility="gone" />