Skip to content

Instantly share code, notes, and snippets.

@arod2634
Created March 1, 2015 23:13
Show Gist options
  • Save arod2634/3d189582762b0d4f0a41 to your computer and use it in GitHub Desktop.
Save arod2634/3d189582762b0d4f0a41 to your computer and use it in GitHub Desktop.
Android Linear Layout Vertical Example
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent"
android:weightSum="1">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight=".25"
android:text="One"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight=".25"
android:text="Two"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight=".25"
android:text="Three"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight=".25"
android:text="Four"
/>
</LinearLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment