From ec0eb778e1f4faf5bb631498c73ce6783e54e393 Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 15 Mar 2023 21:49:10 +0100 Subject: [PATCH] fix #1987, update to the newer time picker dialog --- app/build.gradle | 2 +- .../simplemobiletools/calendar/pro/activities/EventActivity.kt | 3 +++ .../calendar/pro/activities/SettingsActivity.kt | 1 + .../simplemobiletools/calendar/pro/activities/TaskActivity.kt | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index a70a4678f..ed426dfd9 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -70,7 +70,7 @@ android { } dependencies { - implementation 'com.github.SimpleMobileTools:Simple-Commons:2794ea914a' + implementation 'com.github.SimpleMobileTools:Simple-Commons:36efd1c355' implementation 'androidx.multidex:multidex:2.0.1' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/EventActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/EventActivity.kt index cbc8ec68b..b5dc7156c 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/EventActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/EventActivity.kt @@ -21,6 +21,7 @@ import android.view.inputmethod.EditorInfo import android.widget.ImageView import android.widget.RelativeLayout import com.google.android.material.timepicker.MaterialTimePicker +import com.google.android.material.timepicker.MaterialTimePicker.INPUT_MODE_CLOCK import com.google.android.material.timepicker.TimeFormat import com.google.gson.Gson import com.google.gson.reflect.TypeToken @@ -1376,6 +1377,7 @@ class EventActivity : SimpleActivity() { .setTimeFormat(timeFormat) .setHour(mEventStartDateTime.hourOfDay) .setMinute(mEventStartDateTime.minuteOfHour) + .setInputMode(INPUT_MODE_CLOCK) .build() timePicker.addOnPositiveButtonClickListener { @@ -1419,6 +1421,7 @@ class EventActivity : SimpleActivity() { .setTimeFormat(timeFormat) .setHour(mEventEndDateTime.hourOfDay) .setMinute(mEventEndDateTime.minuteOfHour) + .setInputMode(INPUT_MODE_CLOCK) .build() timePicker.addOnPositiveButtonClickListener { diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/SettingsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/SettingsActivity.kt index 791e44be6..d0fda2ba8 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/SettingsActivity.kt @@ -741,6 +741,7 @@ class SettingsActivity : SimpleActivity() { .setTimeFormat(timeFormat) .setHour(currentDateTime.hourOfDay) .setMinute(currentDateTime.minuteOfHour) + .setInputMode(MaterialTimePicker.INPUT_MODE_CLOCK) .build() timePicker.addOnPositiveButtonClickListener { diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/TaskActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/TaskActivity.kt index 3d5e92dd6..473903d2f 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/TaskActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/TaskActivity.kt @@ -563,6 +563,7 @@ class TaskActivity : SimpleActivity() { .setTimeFormat(timeFormat) .setHour(mTaskDateTime.hourOfDay) .setMinute(mTaskDateTime.minuteOfHour) + .setInputMode(MaterialTimePicker.INPUT_MODE_CLOCK) .build() timePicker.addOnPositiveButtonClickListener {