我有这个recyclerview,背景是用图像制作的。我在肖像和风景中有这两种情况。如何用新的imageview或具有相同颜色的东西填充空白处?用两个图像查看横向模式下的宽度
,这是我的xml:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView
android:id="@+id/home_imageview_superbackground"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true" />
<ImageView
android:id="@+id/home_imageview_background"
android:contentDescription="Background image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:layout_alignParentEnd="true" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true">
<TextView
android:id="@+id/content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="casual"
android:paddingBottom="10dp"
android:paddingStart="5dp"
android:paddingTop="10dp"
android:textAppearance="?attr/textAppearanceListItem"
android:textColor="@android:color/white"
android:textSize="40sp" />
</RelativeLayout>
试了几种方法,但我只是不能够使这项工作。 @ + id/home_imageview_superbackground这是我想放在每个背景图像视图的左侧以填充景观中的空间的imageview。感谢您的帮助。
对不起队友,但你甚至没有尝试帮我:) – Weizen
对不起。创建景观变化布局。 –