我有一个填充AsyncTask的ListView.在运行时,ListView变为不可见,ProgressBar显示在水平的中心,在AsyncTask完成后消失,并再次显示ListView.现在它看起来像这样:
但是我需要在ListView内部显示ProgressBar并且水平和垂直居中:
这是我的布局标记:
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1">
android:id="@+id/LinearHeaderProgress"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center"
android:orientation="vertical"
android:visibility="gone">
android:id="@+id/HeaderProgress"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:id="@+id/listView"/>
我怎样才能做到这一点?
谢谢.