diff options
author | Michael W <baddaemon87@gmail.com> | 2022-12-27 16:52:15 +0100 |
---|---|---|
committer | Michael W <baddaemon87@gmail.com> | 2022-12-27 16:52:15 +0100 |
commit | 8f482b0c8a930d17c4a2a6cdae2ed1de727d28be (patch) | |
tree | fd6dcab8bf07b83d3195bed08e793dd35c2be57e | |
parent | da8bf5fc7a94e3895451ffe5dca7695a33d44881 (diff) |
DeskClock: Timer Setup: Add double-zero button
* Makes input of full minutes/hours easier
Change-Id: I316a1e09f0ddbf5a32083aa5f2a05d8075724a06
-rw-r--r-- | res/layout/timer_setup_digits.xml | 4 | ||||
-rw-r--r-- | src/com/android/deskclock/timer/TimerSetupView.java | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/res/layout/timer_setup_digits.xml b/res/layout/timer_setup_digits.xml index 1c56a818d..c433eee34 100644 --- a/res/layout/timer_setup_digits.xml +++ b/res/layout/timer_setup_digits.xml @@ -148,12 +148,12 @@ style="@style/Widget.Button.TimerSetupDigit" android:layout_width="0dp" android:layout_height="0dp" - android:visibility="invisible" app:layout_constraintDimensionRatio="1:1" app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toStartOf="@id/column_0_right" app:layout_constraintTop_toBottomOf="@id/row_2_bottom" - app:layout_constraintBottom_toBottomOf="parent"/> + app:layout_constraintBottom_toBottomOf="parent" + tools:text="00"/> <com.android.deskclock.widget.MotionButton android:id="@+id/timer_setup_digit_0" diff --git a/src/com/android/deskclock/timer/TimerSetupView.java b/src/com/android/deskclock/timer/TimerSetupView.java index df95d9fdb..28a57dfb0 100644 --- a/src/com/android/deskclock/timer/TimerSetupView.java +++ b/src/com/android/deskclock/timer/TimerSetupView.java @@ -108,6 +108,9 @@ public class TimerSetupView extends LinearLayout implements View.OnClickListener digitView.setText(uidm.getFormattedNumber(digit, 1)); digitView.setOnClickListener(this); } + TextView doubleZero = findViewById(R.id.timer_setup_digit_00); + doubleZero.setText(uidm.getFormattedNumber(0, 2)); + doubleZero.setOnClickListener(this); mDeleteView.setOnClickListener(this); mDeleteView.setOnLongClickListener(this); @@ -143,6 +146,9 @@ public class TimerSetupView extends LinearLayout implements View.OnClickListener public void onClick(View view) { if (view == mDeleteView) { delete(); + } else if (view.getId() == R.id.timer_setup_digit_00) { + append(0); + append(0); } else { append(getDigitForId(view.getId())); } |