Android 为什么我的标题图像消失了?
当pbar可见时标题ImageView消失,然后当其布局设置为消失时出现…我不明白为什么ImageView不显示Android 为什么我的标题图像消失了?,android,android-layout,Android,Android Layout,当pbar可见时标题ImageView消失,然后当其布局设置为消失时出现…我不明白为什么ImageView不显示 <ProgressBar android:id="@+id/title_pbar" android:layout_width="30dp" android:layout_height="30dp" android:layout_alignParentLeft="true" android:layou
<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" />
因为
ImageView
是相对于ProgressBar
设置的,所以没有ProgressBar
,没有ImageView
。尝试不同的视图布局。如果无法从RelativeLayout更改(无论出于何种原因),请将ImageView
设置为相对静止视图