Updated layout of NumpadTimePickerDialog

This commit is contained in:
Phillip Hsu
2016-08-17 16:51:40 -07:00
parent 3732246bb7
commit abd1551bc3
7 changed files with 46 additions and 35 deletions
@@ -20,11 +20,13 @@
android:layout_height="wrap_content"
app:layout_gravity="center"
app:layout_column="1"
android:src="@drawable/ic_done_24dp"/>
android:src="@drawable/ic_done_24dp"
android:layout_marginBottom="@dimen/numeric_keypad_fab_bottom_margin"/>
<ImageButton
android:id="@+id/backspace"
android:src="@drawable/ic_backspace_24dp"
android:layout_height="@dimen/numeric_keypad_backspace_height"
style="@style/GridLayoutNumpadElement"
app:layout_column="2"/>
@@ -7,30 +7,29 @@ doesn't work. -->
android:layout_width="match_parent"
android:layout_height="match_parent">
<EditText
<TextView
android:id="@+id/input_time"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="@dimen/numeric_keypad_output_box_height"
android:gravity="center"
android:textSize="@dimen/time_input_text_size"
android:background="@android:color/transparent"/>
android:textSize="@dimen/text_size_display_3"
android:fontFamily="sans-serif-light"
style="@style/TextAppearance.AppCompat"/>
<View style="@style/FocusGrabber"
android:id="@+id/focus_grabber"/>
<!--<View style="@style/FocusGrabber"
android:id="@+id/focus_grabber"/>-->
<View style="@style/Divider.Horizontal"
android:id="@+id/header_divider"
android:layout_below="@id/input_time"/>
<!-- TODO: Adjust margins -->
<com.philliphsu.clock2.editalarm.NumpadTimePicker
android:id="@+id/number_grid"
android:layout_width="match_parent"
android:layout_height="310dp"
android:layout_height="@dimen/numeric_keypad_height"
android:layout_below="@id/header_divider"
android:layout_marginTop="@dimen/bottom_sheet_vertical_space"
android:layout_marginStart="@dimen/bottom_sheet_edge_margin"
android:layout_marginEnd="@dimen/bottom_sheet_edge_margin"
android:paddingBottom="@dimen/bottom_sheet_edge_margin"/>
android:layout_marginEnd="@dimen/bottom_sheet_edge_margin"/>
</RelativeLayout>
+7
View File
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- 4 x (numeric_keypad_cell_height) + 56dp FAB height + 16dp FAB bottom margin -->
<dimen name="numeric_keypad_height">328dp</dimen>
<dimen name="numeric_keypad_backspace_height">56dp</dimen> <!-- Same as FAB height -->
<dimen name="numeric_keypad_fab_bottom_margin">16dp</dimen>
</resources>
+6 -4
View File
@@ -17,10 +17,12 @@
<dimen name="half_day_text_size">17sp</dimen>
<!-- NumpadTimePickerDialog -->
<dimen name="numpad_height">300dp</dimen>
<dimen name="time_input_text_size">45sp</dimen>
<dimen name="viewpager_bottom_padding">88dp
</dimen> <!-- 56dp fab size + 16dp top margin + 16dp bottom margin -->
<dimen name="numpad_height">300dp</dimen> <!-- TODO: Deprecated -->
<dimen name="numeric_keypad_cell_height">64dp</dimen>
<dimen name="numeric_keypad_output_box_height">80dp</dimen>
<dimen name="numeric_keypad_height">344dp</dimen> <!-- 4 x (numeric_keypad_cell_height) + 88dp pre-21 FAB height -->
<dimen name="numeric_keypad_backspace_height">88dp</dimen> <!-- Same as pre-21 FAB height -->
<dimen name="numeric_keypad_fab_bottom_margin">0dp</dimen> <!-- 88dp height already big enough -->
<!-- Bottom sheet specs -->
<dimen name="bottom_sheet_edge_margin">24dp</dimen>
+4 -2
View File
@@ -35,14 +35,16 @@
Leave off the namespace to reference a custom attribute.
Here, we are referencing the "grid:" namespace -->
<item name="layout_columnWeight">1</item>
<item name="layout_rowWeight">1</item>
<!--<item name="layout_rowWeight">1</item>-->
<item name="android:layout_height">@dimen/numeric_keypad_cell_height</item>
<item name="android:background">?android:attr/selectableItemBackground</item>
<item name="android:gravity">center</item>
</style>
<!-- TODO: Rename to GridLayout[Text/Button/TextView]? -->
<style name="GridLayoutNumpadButton" parent="GridLayoutNumpadElement">
<item name="android:textSize">@dimen/grid_element_text_size</item>
<item name="android:textSize">@dimen/text_size_display_1</item>
<item name="android:fontFamily">sans-serif-light</item>
</style>
<!-- TODO: Replace and Delete -->