Android PercentRelativeLayout`aspectRatio`和隐式高度
我想把一个图像放在另一个图像的上面,同时仍然保持纵横比。这是我目前拥有的Android PercentRelativeLayout`aspectRatio`和隐式高度,android,android-layout,android-percentrelativelayout,Android,Android Layout,Android Percentrelativelayout,我想把一个图像放在另一个图像的上面,同时仍然保持纵横比。这是我目前拥有的 <android.support.percent.PercentRelativeLayout xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="wrap_content">
<android.support.percent.PercentRelativeLayout
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!-- 16 / 9 Image -->
<ImageView
android:scaleType="centerCrop"
app:layout_aspectRatio="178%"
app:layout_widthPercent="100%"
app:imageUrl="@{API.Backdrop(basePath, show)}" />
<!-- 27/40 Aspect Ratio -->
<ImageView
android:scaleType="centerCrop"
app:layout_aspectRatio="67.5%"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_alignParentBottom="true"
app:imageUrl="@{API.Poster(basePath, show)}"/>
</android.support.percent.PercentRelativeLayout>