Ich habe das folgende Layout, das ist 1 Symbol auf der linken Seite und 2 Text Ansichten (übereinander gestapelt) auf der rechten Seite. Ich möchte den text1 vertikal in der Mitte zentrieren und wenn ich den text2 Visible.GONE mache. Kannst du mir bitte sagen, wie kann ich das machen?Wie kann ich Bild vertikale Mitte in einem linearen Layout ausrichten
<RelativeLayout android:id="@+id/panel"
android:layout_width="fill_parent"
android:layout_height="?android:attr/listPreferredItemHeight">
<ImageView
android:id="@+id/icon1"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_gravity="center_vertical"/>
<TextView android:id="@+id/text1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/icon1"
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_gravity="center_vertical"/>
<TextView android:id="@+id/text2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/icon1"
android:layout_below="@id/text1"
android:textAppearance="?android:attr/textAppearanceSmall"/>
</RelativeLayout>
android: layout_alignParentTop = "wahr" - deshalb –