Skip to content

Instantly share code, notes, and snippets.

@redtripleAAA
Created January 27, 2018 02:08
Show Gist options
  • Save redtripleAAA/02eaf105694d38114a13e4bd9e6a132b to your computer and use it in GitHub Desktop.
Save redtripleAAA/02eaf105694d38114a13e4bd9e6a132b to your computer and use it in GitHub Desktop.
Linear Layout - Layout Weight
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:src="@drawable/ocean"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:scaleType="centerCrop" />
<TextView
android:text="You're invited!"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@android:color/white"
android:textSize="54sp"
android:background="#009688" />
<TextView
android:text="Bonfire at the beach"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@android:color/white"
android:textSize="34sp"
android:background="#009688" />
</LinearLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment