Bottom sheet time picker working
This commit is contained in:
@@ -3,72 +3,52 @@
|
||||
xmlns:grid="http://schemas.android.com/apk/res-auto">
|
||||
<Button
|
||||
android:id="@+id/one"
|
||||
style="@style/grid_element_single"
|
||||
grid:layout_rowWeight="1"
|
||||
grid:layout_columnWeight="1"
|
||||
style="@style/GridLayoutNumpadButton"
|
||||
android:text="1"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/two"
|
||||
style="@style/grid_element_single"
|
||||
grid:layout_rowWeight="1"
|
||||
grid:layout_columnWeight="1"
|
||||
style="@style/GridLayoutNumpadButton"
|
||||
android:text="2"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/three"
|
||||
style="@style/grid_element_single"
|
||||
grid:layout_rowWeight="1"
|
||||
grid:layout_columnWeight="1"
|
||||
style="@style/GridLayoutNumpadButton"
|
||||
android:text="3"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/four"
|
||||
style="@style/grid_element_single"
|
||||
grid:layout_rowWeight="1"
|
||||
grid:layout_columnWeight="1"
|
||||
style="@style/GridLayoutNumpadButton"
|
||||
android:text="4"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/five"
|
||||
style="@style/grid_element_single"
|
||||
grid:layout_rowWeight="1"
|
||||
grid:layout_columnWeight="1"
|
||||
style="@style/GridLayoutNumpadButton"
|
||||
android:text="5"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/six"
|
||||
style="@style/grid_element_single"
|
||||
grid:layout_rowWeight="1"
|
||||
grid:layout_columnWeight="1"
|
||||
style="@style/GridLayoutNumpadButton"
|
||||
android:text="6"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/seven"
|
||||
style="@style/grid_element_single"
|
||||
grid:layout_rowWeight="1"
|
||||
grid:layout_columnWeight="1"
|
||||
style="@style/GridLayoutNumpadButton"
|
||||
android:text="7"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/eight"
|
||||
style="@style/grid_element_single"
|
||||
grid:layout_rowWeight="1"
|
||||
grid:layout_columnWeight="1"
|
||||
style="@style/GridLayoutNumpadButton"
|
||||
android:text="8"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/nine"
|
||||
style="@style/grid_element_single"
|
||||
grid:layout_rowWeight="1"
|
||||
grid:layout_columnWeight="1"
|
||||
style="@style/GridLayoutNumpadButton"
|
||||
android:text="9"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/zero"
|
||||
style="@style/grid_element_single"
|
||||
grid:layout_rowWeight="1"
|
||||
grid:layout_columnWeight="1"
|
||||
style="@style/GridLayoutNumpadButton"
|
||||
grid:layout_column="1"
|
||||
android:text="0"/>
|
||||
</merge>
|
||||
@@ -6,23 +6,17 @@
|
||||
|
||||
<Button
|
||||
android:id="@+id/leftAlt"
|
||||
style="@style/grid_element_single"
|
||||
app:layout_rowWeight="1"
|
||||
app:layout_columnWeight="1"
|
||||
style="@style/GridLayoutNumpadButton"
|
||||
app:layout_column="0"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/rightAlt"
|
||||
style="@style/grid_element_single"
|
||||
app:layout_rowWeight="1"
|
||||
app:layout_columnWeight="1"
|
||||
style="@style/GridLayoutNumpadButton"
|
||||
app:layout_column="2"/>
|
||||
|
||||
<!-- Used to properly position the FAB -->
|
||||
<FrameLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="@dimen/fab_cell_height"
|
||||
android:layout_height="56dp"
|
||||
app:layout_columnWeight="1"
|
||||
app:layout_column="1">
|
||||
|
||||
@@ -38,8 +32,6 @@
|
||||
<ImageButton
|
||||
android:id="@+id/backspace"
|
||||
android:src="@drawable/ic_backspace_24dp"
|
||||
android:background="?selectableItemBackground"
|
||||
app:layout_rowWeight="1"
|
||||
app:layout_columnWeight="1"
|
||||
style="@style/GridLayoutNumpadElement"
|
||||
app:layout_column="2"/>
|
||||
</merge>
|
||||
@@ -61,6 +61,10 @@
|
||||
android:id="@+id/number_grid"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/numpad_height"
|
||||
android:layout_below="@id/header"/>
|
||||
android:layout_below="@id/header"
|
||||
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:layout_marginBottom="@dimen/bottom_sheet_vertical_space"/>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -26,4 +26,8 @@
|
||||
<dimen name="scrolling_grid_height">270dp</dimen>
|
||||
<dimen name="scrollbar_width">10dp</dimen>
|
||||
<dimen name="ampm_text_size">24sp</dimen>
|
||||
|
||||
<!-- Bottom sheet specs -->
|
||||
<dimen name="bottom_sheet_edge_margin">24dp</dimen>
|
||||
<dimen name="bottom_sheet_vertical_space">16dp</dimen>
|
||||
</resources>
|
||||
|
||||
@@ -26,6 +26,19 @@
|
||||
<item name="android:textSize">@dimen/grid_element_text_size</item>
|
||||
</style>
|
||||
|
||||
<style name="GridLayoutNumpadElement">
|
||||
<!-- http://stackoverflow.com/a/6868308/5055032
|
||||
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="android:background">?android:attr/selectableItemBackground</item>
|
||||
</style>
|
||||
|
||||
<style name="GridLayoutNumpadButton" parent="GridLayoutNumpadElement">
|
||||
<item name="android:textSize">@dimen/grid_element_text_size</item>
|
||||
</style>
|
||||
|
||||
<style name="hybrid_time_picker_grid_element">
|
||||
<item name="android:layout_width">@dimen/grid_element_touch_target</item>
|
||||
<item name="android:layout_height">@dimen/grid_element_touch_target</item>
|
||||
|
||||
Reference in New Issue
Block a user