0

我知道有几种方法可以做到这一点(我都不喜欢)——所以我求助于 SOF 的专家。

我想使用ProgressBar. 问题是我想用它作为我的ImageView. 有没有办法做到这一点?我开始尝试这个,drawable但我不确定如何去做。

4

3 回答 3

1

您可以使用 a在和 aViewSwitcher之间切换。您可以将 设置为第一个孩子,当您加载完图像后,您可以切换到.ImageViewProgressBarProgressBarImageView

于 2011-08-04T05:25:37.710 回答
0

使用 FrameAnimation drawable 作为 ImageView 的来源,或者您可以使用 TweenAnimation 旋转它。

动画资源

于 2011-08-04T05:07:07.097 回答
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>
于 2011-08-04T05:17:56.810 回答