私のアプリケーションにはこのレイアウトがありますが、問題は、ImageView
IDを持つものがoverlay
他のレイアウトの上に表示されないことです。また、Android SDK Hierarchyビューアツールでレイアウトを確認すると、ImageView
高さが0で、下部に配置されています。レイアウト。私は何が欠けていますか?またはその理由は何ですか?
ありがとう。
注:Button
この問題は、そのビューを同じ条件のに置き換えても発生しません。ただし、、、View
またはで発生しImageView
ます。
編集:私はImageView
全体のビューを少し赤みを帯びさせるために言及を使用しています、そして私はそれをListView
アイテムとして使用しています。
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<TextView
android:id="@+id/label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="@+id/image" />
<ImageView
android:id="@id/image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"/>
<ImageView
android:id="@+id/overlay"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:background="#77ff0000" />
</RelativeLayout>