Skip to content

Instantly share code, notes, and snippets.

@Shadie6
Created September 4, 2014 06:47
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 Shadie6/fb9a6223ff45d372bce8 to your computer and use it in GitHub Desktop.
Save Shadie6/fb9a6223ff45d372bce8 to your computer and use it in GitHub Desktop.
** Filter Drawer Layout **
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="350dp"
android:layout_height="match_parent"
android:background="@android:color/background_dark"
android:divider="@android:color/transparent"
android:dividerHeight="0dp"
tools:context="it.gn.sfa.FilterDrawerFragment">
<TableRow
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginTop="15dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/remainders_filter" />
<Spinner
android:id="@+id/customer_filter_remainders"
android:layout_width="120dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:entries="@array/arrayRemainders"
android:prompt="@string/no_remainders"
android:spinnerMode="dropdown" />
</TableRow>
<TableRow
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginTop="15dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/customer_type_filter" />
<Spinner
android:id="@+id/customer_filter_type"
android:layout_width="120dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:entries="@array/arrayCustomerType"
android:prompt="@string/no_customer_type"
android:spinnerMode="dropdown" />
</TableRow>
<TableRow
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginTop="15dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/last_order_filter" />
</TableRow>
<TableRow
android:layout_marginLeft="35dp"
android:layout_marginRight="15dp"
android:layout_marginTop="15dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/last_order_from_filter" />
<TextView
android:id="@+id/customer_filter_last_order_from"
style="@style/SpinnerAppTheme"
android:layout_width="120dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:clickable="true"
android:inputType="date"
android:onClick="showDatePickerFrom" />
</TableRow>
<TableRow
android:layout_marginLeft="35dp"
android:layout_marginRight="15dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/last_order_to_filter" />
<TextView
android:id="@+id/customer_filter_last_order_to"
style="@style/SpinnerAppTheme"
android:layout_width="120dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:clickable="true"
android:inputType="date"
android:onClick="showDatePickerTo" />
</TableRow>
<TableRow
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginTop="15dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/channel_filter" />
<Spinner
android:id="@+id/customer_filter_channel"
android:layout_width="120dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:entries="@array/arrayChannel"
android:prompt="@string/no_channel"
android:spinnerMode="dropdown" />
</TableRow>
</TableLayout>
** Main Layout **
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="it.gn.sfa.Main">
<FrameLayout
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg_castle_white" />
<fragment
android:id="@+id/navigation_drawer"
android:name="it.gn.sfa.NavigationDrawerFragment"
android:layout_width="@dimen/navigation_drawer_width"
android:layout_height="match_parent"
android:layout_gravity="start"
tools:layout="@layout/fragment_navigation_drawer" />
<fragment
android:id="@+id/filter_drawer"
android:name="it.gn.sfa.FilterDrawerFragment"
android:layout_width="@dimen/filter_drawer_width"
android:layout_height="match_parent"
android:layout_gravity="right"
tools:layout="@layout/fragment_filter_drawer" />
</android.support.v4.widget.DrawerLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment