<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="com.blogspot.shalvinpd.linearlayouteg.MainActivity"
android:weightSum="2">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_weight="1"
android:text="Hello World!"
android:background="@color/colorPrimary"/>
<TextView
android:layout_width="match_parent"
android:background="@color/colorAccent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Hello World!" />
</LinearLayout>
Friday, June 24, 2016
Android LinearLayout weight_sum and weight properties
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment