【发布时间】:2017-07-31 10:48:06
【问题描述】:
我有这个recyclerview,背景是用imageviews制作的。我在纵向和横向中有这两种情况。如何用新的图像视图或相同颜色的东西填充那里的空白?
这是我的 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 这是我想放在每个背景图像视图左侧的图像视图,以填充景观中的空间。谢谢你的帮助。
【问题讨论】:
标签: java android imageview landscape