0

这是我的代码:

<ProgressBar
    android:id="@+id/progressBar_main"
    style="?android:attr/progressBarStyleLarge"
    android:layout_width="30dip"
    android:layout_height="30dip"
    android:layout_marginRight="8dip"
    android:layout_marginTop="8dip"
    android:layout_alignParentRight="true"
    android:visibility="gone"/>

<ImageView
    android:id="@+id/iv_broadcast"
    android:layout_width="45dip"
    android:layout_height="45dip"
    android:layout_marginRight="3dip"
    android:layout_marginTop="1dip"
    android:layout_toLeftOf="@+id/progressBar_main"
    android:scaleType="fitXY"/>

在此处输入图像描述

正确的图像是 image1 和 image2,实际输出的是 image1 和 image3。
应用程序加载数据时,加载栏将设置为VISIBLE,图像正确显示为 image1。加载过程完成后,加载栏将设置为GONE,它应该显示image2,但是它显示为image3,这是错误的。
我怎样才能设置纠正一个(image1 + image2),而不是(image1 + image 3)。我不知道为什么笑脸会向左走。谢谢

4

2 回答 2

-1

使用这个 imageview 代码

<ImageView
     android:id="@+id/iv_broadcast"
     android:layout_width="45dip"
     android:layout_height="45dip"
     android:layout_alignParentRight="true"
     android:layout_marginRight="3dip"
     android:layout_marginTop="1dip"
     android:layout_toLeftOf="@+id/progressBar_main"
     android:scaleType="fitXY" />
于 2012-12-17T04:50:06.337 回答
-1

将 android:layout_alignParentRight="true" 赋予进度条和图像视图。

于 2012-12-17T05:36:25.543 回答