Ich habe eine RelativeLayout innerhalb eines LinearLayout und aus irgendeinem Grund kann ich nicht die Polsterung zwischen dem Text und der Trennlinie der ersten Zeile loswerden. Wie ist es möglich, Text/LinearLayout nach oben auszurichten?Ausrichten eines verschachtelten LinearLayout nach oben
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/file_row_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="top"
android:baselineAligned="false">
<ImageView
android:id="@+id/file_row_thumb"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_weight="0"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:scaleType="fitStart" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/file_row_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16dp" />
<TextView
android:id="@+id/file_row_desc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="12dp" />
</LinearLayout>
<ImageButton
android:scaleType="fitStart"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_weight="0"
android:background="?android:selectableItemBackground"
android:onClick="showFilePopup"
android:src="@drawable/ic_more_vert" />
Studio-Vorschau zeigt die gestrichelte Linie. Ist es für die Polsterung verantwortlich?
ich sehe keine RelativeLayo ut in dem Code, den Sie gepostet haben. –
@NongthonbamTonthoi Entschuldigungen. Ich meine natürlich LinearLayout. Ich habe die Frage aktualisiert. Danke für den Tipp. – dc10