プログレスバーはレイアウトの中央に表示されますが、レイアウトの中央に配置したいと思います。私もStackoverflowの他の答えを試みたが、それは動作しませんでした。ここではレイアウトは次のとおりです。Android:レイアウトの中心に円形のプログレスバーを設定
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ProgressBar
android:id="@+id/progressbar"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_centerInParent="true"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"/>
<android.support.v7.widget.RecyclerView
android:id="@+id/dashboard_recyclerview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scrollbars="vertical"
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
</RelativeLayout>
@BansalレアDの質問。彼はすでにそれを適用しました。 –