Skip to content

Instantly share code, notes, and snippets.

@maxlord
Created June 14, 2017 08:50
Show Gist options
  • Save maxlord/d0f8dbe85a8a32c86282e8636c1d069f to your computer and use it in GitHub Desktop.
Save maxlord/d0f8dbe85a8a32c86282e8636c1d069f to your computer and use it in GitHub Desktop.
checkbox layout
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="16dp">
<CheckBox
android:id="@+id/checkbox"
style="@style/Widget.Avito.CheckBox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="16dp"
android:layout_marginRight="32dp"
android:layout_marginTop="16dp" />
<include
android:id="@+id/title"
layout="@layout/text_subheading"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="16dp"
android:layout_marginTop="18dp"
android:layout_toLeftOf="@+id/icon"
android:layout_toRightOf="@+id/checkbox" />
<include
android:id="@+id/hint"
layout="@layout/text_body"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/title"
android:layout_marginRight="16dp"
android:layout_marginTop="4dp"
android:layout_toLeftOf="@+id/icon"
android:layout_toRightOf="@+id/checkbox" />
<ImageView
android:id="@+id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="16dp"
android:layout_marginTop="16dp"
android:src="@drawable/ic_checkmark_blue_24" />
</RelativeLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment