Skip to content

Instantly share code, notes, and snippets.

@makorowy
Created March 2, 2019 12:52
Show Gist options
  • Select an option

  • Save makorowy/65a2178063fe098763261711c246edb7 to your computer and use it in GitHub Desktop.

Select an option

Save makorowy/65a2178063fe098763261711c246edb7 to your computer and use it in GitHub Desktop.
Sample for article needs - How to create a compound view?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical"
tools:context=".MainActivity">
<com.makor.compoundviewexample.ConsentsView
android:id="@+id/consentsView"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<Button
android:id="@+id/confirmButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="48dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="48dp"
android:enabled="false"
android:text="@string/confirm" />
</LinearLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment