Merge branch 'reverted_numpad_time_picker' into timers
This commit is contained in:
@@ -51,10 +51,4 @@
|
||||
style="@style/GridLayoutNumpadButton"
|
||||
grid:layout_column="1"
|
||||
android:text="0"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/backspace"
|
||||
android:src="@drawable/ic_backspace_24dp"
|
||||
style="@style/GridLayoutNumpadElement"
|
||||
grid:layout_column="2"/>
|
||||
</merge>
|
||||
@@ -5,7 +5,7 @@
|
||||
<ImageButton
|
||||
style="@style/GridLayoutNumpadElement"
|
||||
android:src="@drawable/ic_minus_circle_24dp"
|
||||
app:layout_column="1"/>
|
||||
app:layout_column="0"/>
|
||||
<ImageButton
|
||||
style="@style/GridLayoutNumpadElement"
|
||||
android:src="@drawable/ic_add_circle_24dp"
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<include layout="@layout/content_grid_layout_numpad"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/leftAlt"
|
||||
style="@style/GridLayoutNumpadButton"
|
||||
app:layout_column="0"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/rightAlt"
|
||||
style="@style/GridLayoutNumpadButton"
|
||||
app:layout_column="2"/>
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_gravity="center"
|
||||
app:layout_column="1"
|
||||
android:src="@drawable/ic_done_24dp"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/backspace"
|
||||
android:src="@drawable/ic_backspace_24dp"
|
||||
style="@style/GridLayoutNumpadElement"
|
||||
app:layout_column="2"/>
|
||||
|
||||
</merge>
|
||||
@@ -29,7 +29,9 @@
|
||||
android:layout_height="@dimen/numpad_height"
|
||||
android:layout_below="@id/time_display_background"
|
||||
app:columnCount="3"
|
||||
android:layout_marginBottom="28dp"/>
|
||||
android:layout_marginStart="@dimen/bottom_sheet_edge_margin"
|
||||
android:layout_marginEnd="@dimen/bottom_sheet_edge_margin"
|
||||
android:paddingBottom="@dimen/anchored_fab_vertical_space"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/divider"
|
||||
|
||||
@@ -1,80 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.design.widget.CoordinatorLayout
|
||||
<!-- TOneverDO: Use LinearLayout as root container when the
|
||||
dialog is a DialogFragment (or a subclass of), or else LWM
|
||||
doesn't work. -->
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<!-- TOneverDO: Use LinearLayout as root container when the
|
||||
dialog is a DialogFragment (or a subclass of), or else LWM
|
||||
doesn't work. -->
|
||||
<RelativeLayout
|
||||
<EditText
|
||||
android:id="@+id/input_time"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/input_time"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:textSize="@dimen/time_input_text_size"
|
||||
android:background="@android:color/transparent"/>
|
||||
|
||||
<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="256dp"
|
||||
android:layout_below="@id/header_divider"
|
||||
android:layout_marginTop="@dimen/bottom_sheet_vertical_space"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_marginBottom="28dp"/>
|
||||
|
||||
<View style="@style/Divider.Horizontal"
|
||||
android:id="@+id/footer_divider"
|
||||
android:layout_below="@id/number_grid"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ampm"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_below="@id/footer_divider">
|
||||
|
||||
<Button
|
||||
android:id="@+id/leftAlt"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="?selectableItemBackground"
|
||||
android:textSize="20sp"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/rightAlt"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="?selectableItemBackground"
|
||||
android:textSize="20sp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_done_24dp"
|
||||
app:layout_anchor="@id/footer_divider"
|
||||
app:layout_anchorGravity="center"/>
|
||||
android:gravity="center"
|
||||
android:textSize="@dimen/time_input_text_size"
|
||||
android:background="@android:color/transparent"/>
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
<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_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"/>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/GridLayoutNumpadButton"
|
||||
android:text="1"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"/>
|
||||
@@ -25,4 +25,9 @@
|
||||
<!-- Bottom sheet specs -->
|
||||
<dimen name="bottom_sheet_edge_margin">24dp</dimen>
|
||||
<dimen name="bottom_sheet_vertical_space">16dp</dimen>
|
||||
<dimen name="anchored_fab_vertical_space">28dp</dimen>
|
||||
<!-- If the total height of the contents of a bottom sheet does not exceed this limit,
|
||||
then the sheet will show fully expanded; the contents are not stretched to match this height.
|
||||
This is large enough to accommodate most, if not all, of our layouts. -->
|
||||
<dimen name="peek_height_upper_limit">500dp</dimen>
|
||||
</resources>
|
||||
|
||||
@@ -5,11 +5,15 @@
|
||||
<!-- Time picker style -->
|
||||
<string name="key_time_picker_style">key_time_picker_style</string>
|
||||
<string name="title_time_picker_style">Time picker style</string>
|
||||
<string name="number_pad">Number pad</string>
|
||||
<string name="radial_clock">Radial clock</string>
|
||||
<!-- Internally, we refer to this picker as a numpad because it's concise.
|
||||
However, "numeric keypad" is more descriptive when describing the style to users. -->
|
||||
<string name="number_pad">Numeric keypad</string>
|
||||
<!--<string name="radial_clock">Radial clock</string>-->
|
||||
<string name="grid_selector">Grid selector</string>
|
||||
<string-array name="array_time_picker_styles">
|
||||
<item>@string/number_pad</item>
|
||||
<item>@string/radial_clock</item>
|
||||
<!--<item>@string/radial_clock</item>-->
|
||||
<item>@string/grid_selector</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Silence after -->
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
<!-- TODO: This doesn't work for BottomSheetDialogs. Verify this works for other types of dialogs. -->
|
||||
<item name="dialogTheme">@style/AppCompatDialogTheme</item>
|
||||
<item name="bottomSheetDialogTheme">@style/BottomSheetDialogTheme</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar"/>
|
||||
@@ -57,7 +60,11 @@
|
||||
</style>
|
||||
|
||||
<style name="Divider">
|
||||
<item name="android:background">?android:attr/listDivider</item>
|
||||
<!-- Won't be visible in a bottom sheet dialog... -->
|
||||
<!--<item name="android:background">?android:attr/listDivider</item>-->
|
||||
<!-- Extracted from the drawable pointed to by the attr. Visible in bottom sheet. -->
|
||||
<item name="android:background">#1f000000</item> <!-- 12% black -->
|
||||
<item name="android:tint">?android:attr/colorForeground</item>
|
||||
</style>
|
||||
|
||||
<style name="Divider.Horizontal">
|
||||
@@ -78,4 +85,17 @@
|
||||
<item name="android:focusableInTouchMode">true</item>
|
||||
</style>
|
||||
|
||||
<!-- Style for AppCompatDialog from the v7 support library -->
|
||||
<style name="AppCompatDialogTheme" parent="Theme.AppCompat.Light.Dialog">
|
||||
<item name="colorAccent">?android:attr/colorAccent</item>
|
||||
</style>
|
||||
|
||||
<style name="BottomSheetDialogTheme" parent="Theme.Design.Light.BottomSheetDialog">
|
||||
<item name="bottomSheetStyle">@style/ModalStyle</item>
|
||||
</style>
|
||||
|
||||
<style name="ModalStyle" parent="Widget.Design.BottomSheet.Modal">
|
||||
<item name="behavior_peekHeight">@dimen/peek_height_upper_limit</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user