我想将 ImageB
置于 ImageA
之上。我该怎么做?
注意:
ImageA
和 ImageB
的高度不同。
<RelativeLayout
android:layout_height="wrap_content"
android:layout_width="match_parent">
<ImageView
android:id="@+id/imageA"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:scaleType="fitCenter"
android:src="@drawable/imageA"
android:adjustViewBounds="true"/>
<!-- How to let imageB matches imageA's height ? -->
<ImageView
android:id="@+id/imageB"
android:layout_height="match_parent"
android:layout_width="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:src="@drawable/imageB"/>
</RelativeLayout>
任何帮助将不胜感激。
答案 0 :(得分:0)
试试此代码
?
希望这个帮助