I have a LinearLayout and inside, a ImageView and TextView. I want to align the center of the LinearLayout the ImageView and the TextView below the ImageView.
I only get the top align ImageView in LinearLayout. How I can do?
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal"
android:layout_weight="1"
android:layout_margin="8dp"
android:gravity="center_horizontal"
android:orientation="vertical" >
<ImageView
android:id="@+id/boton"
android:layout_width="90dp"
android:layout_height="90dp"
android:layout_gravity="center"
android:background="@drawable/plano"
android:gravity="center" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Plano"
android:textSize="23sp"
android:textStyle="bold"
/>
</LinearLayout>
See Question&Answers more detail:os