Created landscape layout for numeric keypad picker
This commit is contained in:
parent
2d4d661d7f
commit
841a54e3f5
@ -2,15 +2,16 @@
|
|||||||
<!-- TOneverDO: Use LinearLayout as root container when the
|
<!-- TOneverDO: Use LinearLayout as root container when the
|
||||||
dialog is a DialogFragment (or a subclass of), or else LWM
|
dialog is a DialogFragment (or a subclass of), or else LWM
|
||||||
doesn't work. -->
|
doesn't work. -->
|
||||||
<RelativeLayout
|
<LinearLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/input_time"
|
android:id="@+id/input_time"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="@dimen/left_side_width"
|
||||||
android:layout_height="@dimen/numeric_keypad_output_box_height"
|
android:layout_height="match_parent"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:textSize="@dimen/text_size_display_3"
|
android:textSize="@dimen/text_size_display_3"
|
||||||
android:fontFamily="sans-serif"
|
android:fontFamily="sans-serif"
|
||||||
@ -21,11 +22,11 @@ doesn't work. -->
|
|||||||
|
|
||||||
<com.philliphsu.clock2.editalarm.NumpadTimePicker
|
<com.philliphsu.clock2.editalarm.NumpadTimePicker
|
||||||
android:id="@+id/number_grid"
|
android:id="@+id/number_grid"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="@dimen/numeric_keypad_height"
|
android:layout_height="match_parent"
|
||||||
android:layout_below="@id/input_time"
|
android:layout_weight="1"
|
||||||
android:layout_marginTop="@dimen/bottom_sheet_vertical_space"
|
android:layout_marginTop="@dimen/bottom_sheet_vertical_space"
|
||||||
android:layout_marginStart="@dimen/bottom_sheet_edge_margin"
|
android:layout_marginStart="@dimen/bottom_sheet_edge_margin"
|
||||||
android:layout_marginEnd="@dimen/bottom_sheet_edge_margin"/>
|
android:layout_marginEnd="@dimen/bottom_sheet_edge_margin"/>
|
||||||
|
|
||||||
</RelativeLayout>
|
</LinearLayout>
|
||||||
@ -2,10 +2,11 @@
|
|||||||
<!-- TOneverDO: Use LinearLayout as root container when the
|
<!-- TOneverDO: Use LinearLayout as root container when the
|
||||||
dialog is a DialogFragment (or a subclass of), or else LWM
|
dialog is a DialogFragment (or a subclass of), or else LWM
|
||||||
doesn't work. -->
|
doesn't work. -->
|
||||||
<RelativeLayout
|
<LinearLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/input_time"
|
android:id="@+id/input_time"
|
||||||
@ -28,4 +29,4 @@ doesn't work. -->
|
|||||||
android:layout_marginStart="@dimen/bottom_sheet_edge_margin"
|
android:layout_marginStart="@dimen/bottom_sheet_edge_margin"
|
||||||
android:layout_marginEnd="@dimen/bottom_sheet_edge_margin"/>
|
android:layout_marginEnd="@dimen/bottom_sheet_edge_margin"/>
|
||||||
|
|
||||||
</RelativeLayout>
|
</LinearLayout>
|
||||||
4
app/src/main/res/values-land-v21/dimens.xml
Normal file
4
app/src/main/res/values-land-v21/dimens.xml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<dimen name="numeric_keypad_cell_height">50dp</dimen>
|
||||||
|
</resources>
|
||||||
@ -2,20 +2,17 @@
|
|||||||
<dimen name="grid_element_text_size">24sp</dimen>
|
<dimen name="grid_element_text_size">24sp</dimen>
|
||||||
|
|
||||||
<!-- NumpadTimePickerDialog -->
|
<!-- NumpadTimePickerDialog -->
|
||||||
<dimen name="numpad_height">300dp</dimen> <!-- TODO: Deprecated -->
|
<dimen name="numeric_keypad_cell_height">42dp</dimen>
|
||||||
<dimen name="numeric_keypad_cell_height">64dp</dimen>
|
<!--<dimen name="numeric_keypad_height">344dp</dimen> <!– 4 * (numeric_keypad_cell_height) + 88dp pre-21 FAB height –>-->
|
||||||
<dimen name="numeric_keypad_output_box_height">80dp</dimen>
|
<!--<dimen name="numeric_keypad_backspace_height">88dp</dimen> <!– Same as pre-21 FAB height –>-->
|
||||||
<dimen name="numeric_keypad_height">344dp</dimen> <!-- 4 * (numeric_keypad_cell_height) + 88dp pre-21 FAB height -->
|
<!--<dimen name="numeric_keypad_fab_bottom_margin">0dp</dimen> <!– 88dp height already big enough –>-->
|
||||||
<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 -->
|
|
||||||
|
|
||||||
<!-- NumberGridTimePickerDialog -->
|
<!-- NumberGridTimePickerDialog -->
|
||||||
<!--TODO: We don't actually use this. -->
|
<!--<dimen name="number_grid_height">220dp</dimen> <!– 5 * (number_grid_minute_cell_height) –>-->
|
||||||
<dimen name="number_grid_height">220dp</dimen> <!-- 5 * (number_grid_minute_cell_height) -->
|
|
||||||
<dimen name="number_grid_hour_cell_height">55dp</dimen> <!-- 4 * 55 == 5 * (number_grid_minute_cell_height) -->
|
<dimen name="number_grid_hour_cell_height">55dp</dimen> <!-- 4 * 55 == 5 * (number_grid_minute_cell_height) -->
|
||||||
<dimen name="number_grid_minute_cell_height">44dp</dimen>
|
<dimen name="number_grid_minute_cell_height">44dp</dimen>
|
||||||
<!--TODO: Change the height suffix to size or dimen, because this is used as a width in landscape and a height in portrait. -->
|
<!--TODO: Change the height suffix to size or dimen, because this is used as a width in landscape and a height in portrait. -->
|
||||||
<dimen name="half_day_button_bar_height">64dp</dimen>
|
<dimen name="half_day_button_bar_height">72dp</dimen>
|
||||||
<dimen name="number_grid_24_hour_item_primary_text_size">26sp</dimen>
|
<dimen name="number_grid_24_hour_item_primary_text_size">26sp</dimen>
|
||||||
<dimen name="number_grid_minute_text_size">20sp</dimen>
|
<dimen name="number_grid_minute_text_size">20sp</dimen>
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user