Ich versuche, dies zu erreichen:Ich möchte eine bestimmte Zeile Layout acheive, aber kann es mit Android nicht ganz herausfinden,
auf einem Listview, kann aber nicht ganz die Fesseln bekommen auf den Elementen in der Zeile layout.xml richtig, hat jemand einen Vorschlag?
hier mein photo_album_row_layout.xml ist:
<?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>
Es scheint in Ordnung, den Text zu zentrieren, wenn es nur der Titel angezeigt, ansonsten ist es eine Überlappung, ist es das, was ich meine:
Sie benötigen, um Ihre Titel zu platzieren (sum r 2016 ...) relativ zum Text (2015 war ein super ...) –
Danke für den Kommentar, ich realisierte dies, musste nur wissen, wie, und das wurde unten beantwortet. – user3308353