i have some imagebuttons and each one has a corresponding textview, i’d like to align those textview’s to the center of their corresponding imageview, i mean, like is seen on the app drawer…
!-----!
!icon !
!_____!
app name
this is my code, i’m using a RelativeLayout
<ImageButton
android:id="@+id/blog_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@+id/logo_img"
android:layout_marginLeft="50dp"
android:layout_marginTop="51dp"
android:background="@null"
android:contentDescription="@string/blog_desc"
android:src="@drawable/blog" />
<TextView
android:id="@+id/blog_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/blog_button"
android:layout_below="@+id/blog_button"
android:layout_marginTop="8dp"
android:text="@string/blog_desc" />
Wrap that in a
LinearLayoutand center the children, like so: