में छवि लंबवत केंद्र को कैसे संरेखित कर सकता हूं मेरे पास निम्न लेआउट है, जो बाईं ओर 1 आइकन है और दाईं ओर 2 टेक्स्ट दृश्य (एक दूसरे के शीर्ष पर ढेर) है। मैं पैनल में टेक्स्ट 1 लंबवत केंद्र रखना चाहता हूं और जब मैं टेक्स्ट 2 Visible.GONE बना देता हूं। क्या आप कृपया मुझे बता सकते हैं कि मैं यह कैसे कर सकता हूं?मैं रैखिक लेआउट
<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>
एंड्रॉइड: layout_alignParentTop = "true" - यही कारण है कि –