【发布时间】:2013-02-13 13:14:51
【问题描述】:
当应用程序启动时,我从 main.xml 文件中填充了一个进度条,该进度条一直显示到列表为空。一旦列表中填充了来自 URL 的数据,我应该关闭这个进度条。 我如何在不使用进度对话框的情况下做到这一点?
我的 main.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity" >
<ListView
android:id="@+id/list_view_places"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:drawSelectorOnTop="false"
android:fastScrollEnabled="true" >
</ListView>
<ProgressBar
android:id="@+id/empty_progress_bar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true" />
</RelativeLayout>
【问题讨论】:
-
感谢您的链接。这是正确的。
标签: android progress-bar