Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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