Created ScrollingGridTimePickerDialog

This commit is contained in:
Phillip Hsu
2016-07-17 03:02:57 -07:00
parent d1c0820de4
commit bc2446d586
9 changed files with 229 additions and 14 deletions
@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- TOneverDO: Use LinearLayout because it doesn't obey LWM -->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="@+id/grid"
android:layout_width="match_parent"
android:layout_height="@dimen/scrolling_grid_height"
android:scrollbars="vertical"
android:scrollbarSize="@dimen/scrollbar_width"
android:fadeScrollbars="false"
android:layout_alignParentTop="true"/>
<View
android:id="@+id/divider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?android:listDividerAlertDialog"
android:layout_below="@id/grid"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/fab_cell_height"
android:orientation="horizontal"
android:layout_below="@id/divider">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:minHeight="40dp"
android:layout_weight="1"
android:layout_gravity="center"
android:gravity="center"
android:text="AM"
android:textSize="@dimen/ampm_text_size"/>
<FrameLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
<android.support.design.widget.FloatingActionButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/ic_done_24dp"/>
</FrameLayout>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:minHeight="40dp"
android:layout_weight="1"
android:layout_gravity="center"
android:gravity="center"
android:text="PM"
android:textSize="@dimen/ampm_text_size"/>
</LinearLayout>
</RelativeLayout>
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="40dp"
android:textSize="@dimen/grid_element_text_size"
android:gravity="center"
android:layout_gravity="center"/>
+8 -1
View File
@@ -11,11 +11,18 @@
<dimen name="alarm_time_text_size">48sp</dimen>
<dimen name="app_bar_height">180dp</dimen>
<dimen name="text_margin">16dp</dimen>
<dimen name="grid_element_text_size">28sp</dimen>
<!-- NumpadTimePickerDialog -->
<dimen name="header_height">72dp</dimen>
<dimen name="numpad_height">300dp</dimen>
<dimen name="time_input_text_size">45sp</dimen>
<dimen name="cancel_icon_size">56dp</dimen>
<dimen name="fab_cell_height">88dp</dimen> <!-- 56dp fab size + 16dp top margin + 16dp bottom margin -->
<!-- ScrollingGridTimePickerDialog -->
<dimen name="scrolling_grid_height">270dp</dimen>
<dimen name="scrollbar_width">10dp</dimen>
<dimen name="ampm_text_size">24sp</dimen>
</resources>
+1 -1
View File
@@ -25,7 +25,7 @@
<item name="android:layout_width">0dp</item>
<item name="android:layout_height">0dp</item>
<item name="android:background">?android:attr/selectableItemBackground</item>
<item name="android:textSize">28sp</item>
<item name="android:textSize">@dimen/grid_element_text_size</item>
</style>
</resources>