使用 ScrollableTabHost 在活动恢复时进度条停止移动

发布于 2024-10-01 01:15:29 字数 442 浏览 2 评论 0原文

我在其中一项活动中使用进度栏,如下所示:

<ProgressBar android:id="@+id/mProgressBar"
  style="?android:attr/progressBarStyleLarge" android:layout_width="wrap_content"
  android:layout_height="wrap_content" android:layout_gravity="center" />

我的问题是,当我离开活动(例如按后退按钮或启动新活动)并返回时,进度栏显示为停止。

我正在使用这个库(http://code.google.com/p/mobyfactory-uiwidgets-android/)将我的活动托管到选项卡主机中。

我想 UI 线程暂停了,所以进度条动画也停止了。有什么想法如何解决吗?

I use a ProgressBar in one of my activities as this:

<ProgressBar android:id="@+id/mProgressBar"
  style="?android:attr/progressBarStyleLarge" android:layout_width="wrap_content"
  android:layout_height="wrap_content" android:layout_gravity="center" />

My problem is that when I leave the activity (for example press the back button or start a new activity) and return back, the progress bar is shown stopped.

I am using this library (http://code.google.com/p/mobyfactory-uiwidgets-android/) for hosting my activities into a tab host.

I suppose the UI thread pauses, so the progress bar animation stops too. Any ideas how to solve it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文