Skip to content

Instantly share code, notes, and snippets.

@nitink133
Created June 26, 2018 16:22
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 nitink133/d63d7d6a3db820d48c887fa9ef12b036 to your computer and use it in GitHub Desktop.
Save nitink133/d63d7d6a3db820d48c887fa9ef12b036 to your computer and use it in GitHub Desktop.
Android dropdown layout
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/alert_title"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="8dp"
android:layout_weight="1.5"
android:gravity="center"
android:text="Select Options"
android:textColor="@color/black"
android:textSize="20dp"
android:textStyle="bold" />
<TextView
android:id="@+id/alert_takephoto"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="15dp"
android:layout_weight="1"
android:text="Take Photo"
android:textColor="@color/black"
android:textSize="18dp" />
<TextView
android:id="@+id/alert_gallery"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="15dp"
android:layout_weight="1"
android:text="Choose From Gallery"
android:textColor="@color/black"
android:textSize="18dp" />
<TextView
android:id="@+id/alert_cancel"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginBottom="15dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="15dp"
android:layout_weight="1"
android:text="Cancel"
android:textColor="@color/black"
android:textSize="18dp" />
</LinearLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment