In Linear Layout need orientation horizontal and vertical.
XML for Linear layout weight.
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="50dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:orientation="horizontal"> <TextView
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="FIRST"
android:gravity="center"
android:textSize="20sp"
android:textColor="#000000"/> <TextView
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="SECOND"
android:gravity="center"
android:layout_marginLeft="20dp"
android:textSize="20sp"
android:textColor="#000000"/> </LinearLayout>
No comments :
Post a Comment