I use Androids LinearLayout
for each device's different resolution. This way I solve vertical layout problem different resolution.
But I can't solve horizontal layout problem. Ihis is my layout. I want build layout like this.
In this case I use margin left / right but this is not work on different resolution. How to place TextView
relate on resolution?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/LinearLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background"
android:orientation="vertical" >
<TextView
android:id="@+id/titleView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="9"
android:gravity="center"
android:text="TextView"
android:textColor="#5a5856"
android:textSize="35sp" />
<TextView
android:id="@+id/wordDafinitionView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="3"
android:textSize="17sp"
android:layout_marginLeft="25dp"
android:layout_marginRight="30dp"
android:text="TextView"
android:textColor="#5a5856" />
<TextView
android:id="@+id/TextView01"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="9"
android:gravity="center"
android:text="TextView"
android:textColor="#5a5856"
android:textSize="35sp" />
</LinearLayout>
screenshot
saysReferral Denied
– Ye Lin Aung