0
我试图达到这个数字出来:我想acheive特定行布局,但不能完全与Android
上一个ListView,但不能完全得到的束缚在行layout.xml中的项目上,任何人都有建议?
这里是我的photo_album_row_layout.xml:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/photoAlbumTitle"
android:layout_alignParentStart="true"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:textColor="@android:color/black"
android:paddingBottom="@dimen/default_padding"
android:textStyle="bold"
/>
<TextView
android:id="@+id/photoAlbumDesc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:textColor="@android:color/black"
android:layout_below="@+id/photoAlbumTitle"
android:layout_toStartOf="@+id/viewPhotoAlbum"/>
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_alignParentEnd="true"
android:id="@+id/viewPhotoAlbum"/>
<TextView
android:id="@+id/viewPhotoAlbumText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAlignment="center"
android:textSize="12sp"
android:textColor="@android:color/black"
android:text="Open Album"
android:layout_alignStart="@+id/viewPhotoAlbum"
android:layout_alignEnd="@+id/viewPhotoAlbum"
android:layout_below="@+id/viewPhotoAlbum"/>
</RelativeLayout>
这似乎文本居中没关系,如果有只显示标题,否则有重叠,这就是我的意思是:
你需要把你的标题(Summe r 2016 ...)相对于文本(2015年是一个伟大的...) –
感谢您的评论,我意识到这一点,只是需要知道如何,并在下面回答。 – user3308353