You should use LinearLayout with android:weightSum .
use android:weightSum="100" in the root layout and give android:layout_weight as per your requirement. And android:layout_height="0dp" for each View .
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:weightSum="100" > <TextView android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="10" /> <ImageView android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="50" android:contentDescription="@string/image" android:src="@drawable/ic_launcher" /> <TextView android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="40" /> </LinearLayout>
Hope this helps you.
source share