Numpad time picker saves instance state, used in edit alarm screen
This commit is contained in:
@@ -85,17 +85,14 @@
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"/>
|
||||
|
||||
<!-- TODO: Find out how to get a touch ripple; foreground attr didn't work -->
|
||||
<EditText
|
||||
<TextView
|
||||
android:id="@+id/input_time"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:foreground="?selectableItemBackground"
|
||||
android:background="@android:color/transparent"
|
||||
android:background="?selectableItemBackground"
|
||||
android:hint="@string/default_alarm_time_12h"
|
||||
android:textSize="56sp"
|
||||
android:layout_toStartOf="@id/on_off"
|
||||
android:inputType="time"/>
|
||||
android:layout_toStartOf="@id/on_off"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/backspace"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="72dp"
|
||||
android:src="@drawable/ic_backspace_24dp"
|
||||
android:background="?selectableItemBackground"
|
||||
android:layout_alignParentEnd="true"
|
||||
@@ -15,13 +15,14 @@
|
||||
<EditText
|
||||
android:id="@+id/input"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:layout_height="72dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:background="@android:color/transparent"
|
||||
android:textSize="28sp"
|
||||
android:textSize="40sp"
|
||||
android:focusable="false"
|
||||
android:focusableInTouchMode="false"/>
|
||||
android:focusableInTouchMode="false"
|
||||
android:cursorVisible="true"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/divider"
|
||||
@@ -30,19 +31,28 @@
|
||||
android:background="?android:listDivider"
|
||||
android:layout_below="@id/input"/>
|
||||
|
||||
<!-- TODO: Your height attr is being ignored because
|
||||
you constrained this below and above the header and
|
||||
footer views -->
|
||||
<com.philliphsu.clock2.editalarm.NumpadTimePicker
|
||||
android:id="@+id/number_grid"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="270dp"
|
||||
android:layout_below="@id/divider"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/actions"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_alignParentBottom="true">
|
||||
android:layout_below="@id/number_grid">
|
||||
|
||||
<Button
|
||||
android:id="@+id/cancel"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="Cancel"
|
||||
android:text="CANCEL"
|
||||
style="@style/Widget.AppCompat.Button.Borderless.Colored"/>
|
||||
|
||||
<Button
|
||||
@@ -50,16 +60,9 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="Ok"
|
||||
android:text="OK"
|
||||
style="@style/Widget.AppCompat.Button.Borderless.Colored"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.philliphsu.clock2.editalarm.NumpadTimePicker
|
||||
android:id="@+id/number_grid"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/divider"
|
||||
android:layout_above="@id/actions"/>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -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">20sp</item>
|
||||
<item name="android:textSize">28sp</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user