开发者

Why does my title image disappear?

The Title ImageView is gone when the pbar is visible, and then appears when its layout is set to gone...I don't understand why the ImageView is not displaying??

<ProgressBar
        android:id="开发者_运维问答@+id/title_pbar"
        android:layout_width="30dp"
        android:layout_height="30dp"
        android:layout_alignParentLeft="true"
        android:layout_marginLeft="5dp"
        android:visibility="invisible"
        android:layout_centerVertical="true" />

    <ImageView
        android:layout_centerVertical="true"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@drawable/title_s"
        android:layout_toLeftOf="@+id/title_pbar"
        android:layout_marginLeft="5dp" />


Because the ImageView is set relative to the ProgressBar, so no ProgressBar, no ImageView. Try a different view layout. And if you can't change from RelativeLayout (for whatever reason), set the ImageView relative to a stationary view.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜