Skip to content

Instantly share code, notes, and snippets.

@kakopappa
Created April 23, 2019 03:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kakopappa/97c24e235f88017f318a0b9aa13274bc to your computer and use it in GitHub Desktop.
Save kakopappa/97c24e235f88017f318a0b9aa13274bc to your computer and use it in GitHub Desktop.
android layout example - Perference with checkbox
<?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">
<LinearLayout
android:id="@+id/accept_license_block"
android:layout_below="@+id/description_tv"
android:layout_width="fill_parent"
android:layout_height="40dp"
>
<TextView
android:id="@+id/accept_license_tv"
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight="1"
android:textColor="@color/link"
android:focusable="true"
android:clickable="true"
android:text="@string/accept_license_agreement_to_continue"
android:gravity="center_vertical" />
<CheckBox
android:id="@+id/accept_license_cb"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginRight="10dp"
android:gravity="center_vertical" />
</LinearLayout>
</LinearLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment