我知道有几种方法可以做到这一点(我不喜欢这两种方法) - 所以我转向SOF的专家。我想使用ProgressBar
。问题是我想用这个作为我的ImageView
的图像/背景。有没有办法做到这一点?我开始尝试这个drawable
,但我不知道如何去完全。在图像视图中显示“加载器”
0
A
回答
1
您可以使用ViewSwitcher
到ImageView
和ProgressBar
之间切换。您可以将ProgressBar
设置为第一个孩子,当您完成加载图像时,可以切换到ImageView
。
0
使用FrameAnimation drawable作为ImageView的源码 或者您可以使用TweenAnimation将其旋转。
+0
看起来我也需要使用它,但是如何在布局xml(drawable)内显示'ProgressBar'? – Jacksonkr
0
<LinearLayout
android:orientation="horizontal"
... >
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@android:style/Widget.ProgressBar.Small"
android:layout_marginRight="5dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/loading" />
</LinearLayout>
相关问题
- 1. 显示加载图像仍显示“浏览器加载图像”图标
- 2. 加载图像时显示指示器
- 3. Web图像下载vs Web图像显示在图像视图
- 4. 如何在视图中自动加载和显示图像(Codeigniter)
- 5. 下载的图像在图像视图中显示为空
- 6. 通用图像加载器在Android中加载时显示不同的图像
- 7. 如何在加载大图像时显示加载图像?
- 8. 在ActionScript中加载和显示图像
- 9. Xcode显示加载视图,直到第二个视图加载(在segue显示)
- 10. 不显示图像加载器
- 11. “加载”图像不显示
- 12. 如何在文本视图附近显示“加载”图像
- 13. 使用通用图像加载器在列表视图中加载图像
- 14. 在另一个视图控制器中快速显示图像(图像视图)
- 15. 从StoryBoard加载视图控制器时显示空白视图
- 16. 试图显示加载图像
- 17. 图像未显示在视图中
- 18. 在列表视图中显示图像
- 19. 在列表视图中显示图像
- 20. 在asp视图中显示图像
- 21. 在网络视图中显示图像
- 22. FileContentResult在视图中不显示图像
- 23. 在mvc视图中显示图像
- 24. 在滚动视图中显示图像
- 25. 在视图中显示多个图像
- 26. 在Datagrid视图中显示图像
- 27. 在视图中显示图像
- 28. 在视图中显示图像
- 29. 在图像视图中显示nsuserdeafults
- 30. 在drupal视图中显示civicrm图像
看起来很好。我要买它。谢谢 – Jacksonkr
不客气。 :) – sparkymat