updating commons and target SDK to 33
This commit is contained in:
parent
e204ff15bc
commit
6a5832b2ce
|
@ -10,12 +10,12 @@ if (keystorePropertiesFile.exists()) {
|
|||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 31
|
||||
compileSdkVersion 33
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.simplemobiletools.clock"
|
||||
minSdkVersion 23
|
||||
targetSdkVersion 31
|
||||
targetSdkVersion 33
|
||||
versionCode 29
|
||||
versionName "5.8.1"
|
||||
setProperty("archivesBaseName", "clock")
|
||||
|
@ -64,7 +64,7 @@ android {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:dc5ab26794'
|
||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:e79ef36c10'
|
||||
implementation 'com.facebook.stetho:stetho:1.5.1'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||
implementation 'com.shawnlin:number-picker:2.4.6'
|
||||
|
@ -72,10 +72,11 @@ dependencies {
|
|||
implementation "androidx.work:work-runtime-ktx:2.7.1"
|
||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0'
|
||||
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.4.1'
|
||||
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.1'
|
||||
implementation 'org.greenrobot:eventbus:3.3.1'
|
||||
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
|
||||
implementation 'me.grantland:autofittextview:0.2.1'
|
||||
|
||||
implementation 'androidx.room:room-runtime:2.4.2'
|
||||
kapt 'androidx.room:room-compiler:2.4.2'
|
||||
implementation 'androidx.room:room-runtime:2.4.3'
|
||||
kapt 'androidx.room:room-compiler:2.4.3'
|
||||
}
|
||||
|
|
|
@ -193,7 +193,7 @@ class MainActivity : SimpleActivity() {
|
|||
}
|
||||
|
||||
main_tabs_holder.getTabAt(view_pager.currentItem)?.select()
|
||||
val bottomBarColor = getBottomTabsBackgroundColor()
|
||||
val bottomBarColor = getBottomNavigationBackgroundColor()
|
||||
main_tabs_holder.setBackgroundColor(bottomBarColor)
|
||||
updateNavigationBarColor(bottomBarColor)
|
||||
}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package com.simplemobiletools.clock.dialogs
|
||||
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import com.simplemobiletools.clock.R
|
||||
import com.simplemobiletools.clock.activities.SimpleActivity
|
||||
import com.simplemobiletools.clock.adapters.SelectTimeZonesAdapter
|
||||
import com.simplemobiletools.clock.extensions.config
|
||||
import com.simplemobiletools.clock.helpers.getAllTimeZones
|
||||
import com.simplemobiletools.commons.extensions.getAlertDialogBuilder
|
||||
import com.simplemobiletools.commons.extensions.setupDialogStuff
|
||||
import kotlinx.android.synthetic.main.dialog_select_time_zones.view.*
|
||||
|
||||
|
@ -15,12 +15,12 @@ class AddTimeZonesDialog(val activity: SimpleActivity, private val callback: ()
|
|||
init {
|
||||
view.select_time_zones_list.adapter = SelectTimeZonesAdapter(activity, getAllTimeZones())
|
||||
|
||||
AlertDialog.Builder(activity)
|
||||
.setPositiveButton(R.string.ok) { dialog, which -> dialogConfirmed() }
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
.create().apply {
|
||||
activity.setupDialogStuff(view, this)
|
||||
}
|
||||
activity.getAlertDialogBuilder()
|
||||
.setPositiveButton(R.string.ok) { dialog, which -> dialogConfirmed() }
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
.apply {
|
||||
activity.setupDialogStuff(view, this)
|
||||
}
|
||||
}
|
||||
|
||||
private fun dialogConfirmed() {
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package com.simplemobiletools.clock.dialogs
|
||||
|
||||
import android.view.View
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import com.simplemobiletools.clock.R
|
||||
import com.simplemobiletools.clock.extensions.config
|
||||
import com.simplemobiletools.clock.helpers.SORT_BY_ALARM_TIME
|
||||
import com.simplemobiletools.clock.helpers.SORT_BY_CREATION_ORDER
|
||||
import com.simplemobiletools.clock.helpers.SORT_BY_DATE_AND_TIME
|
||||
import com.simplemobiletools.commons.activities.BaseSimpleActivity
|
||||
import com.simplemobiletools.commons.extensions.getAlertDialogBuilder
|
||||
import com.simplemobiletools.commons.extensions.setupDialogStuff
|
||||
import kotlinx.android.synthetic.main.dialog_change_alarm_sort.view.*
|
||||
|
||||
|
@ -22,10 +22,10 @@ class ChangeAlarmSortDialog(val activity: BaseSimpleActivity, val callback: () -
|
|||
}
|
||||
|
||||
init {
|
||||
AlertDialog.Builder(activity)
|
||||
activity.getAlertDialogBuilder()
|
||||
.setPositiveButton(R.string.ok) { _, _ -> dialogConfirmed() }
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
.create().apply {
|
||||
.apply {
|
||||
activity.setupDialogStuff(view, this, R.string.sort_by)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -103,12 +103,12 @@ class EditAlarmDialog(val activity: SimpleActivity, val alarm: Alarm, val callba
|
|||
}
|
||||
}
|
||||
|
||||
AlertDialog.Builder(activity)
|
||||
activity.getAlertDialogBuilder()
|
||||
.setPositiveButton(R.string.ok, null)
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
.create().apply {
|
||||
activity.setupDialogStuff(view, this) {
|
||||
getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener {
|
||||
.apply {
|
||||
activity.setupDialogStuff(view, this) { alertDialog ->
|
||||
alertDialog.getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener {
|
||||
if (!activity.config.wasAlarmWarningShown) {
|
||||
ConfirmationDialog(activity, messageId = R.string.alarm_warning, positive = R.string.ok, negative = 0) {
|
||||
activity.config.wasAlarmWarningShown = true
|
||||
|
@ -143,7 +143,7 @@ class EditAlarmDialog(val activity: SimpleActivity, val alarm: Alarm, val callba
|
|||
|
||||
activity.config.alarmLastConfig = alarm
|
||||
callback(alarmId)
|
||||
dismiss()
|
||||
alertDialog.dismiss()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package com.simplemobiletools.clock.dialogs
|
||||
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import com.simplemobiletools.clock.R
|
||||
import com.simplemobiletools.clock.activities.SimpleActivity
|
||||
import com.simplemobiletools.clock.extensions.config
|
||||
|
@ -9,6 +8,7 @@ import com.simplemobiletools.clock.extensions.getModifiedTimeZoneTitle
|
|||
import com.simplemobiletools.clock.helpers.EDITED_TIME_ZONE_SEPARATOR
|
||||
import com.simplemobiletools.clock.helpers.getDefaultTimeZoneTitle
|
||||
import com.simplemobiletools.clock.models.MyTimeZone
|
||||
import com.simplemobiletools.commons.extensions.getAlertDialogBuilder
|
||||
import com.simplemobiletools.commons.extensions.setupDialogStuff
|
||||
import com.simplemobiletools.commons.extensions.showKeyboard
|
||||
import com.simplemobiletools.commons.extensions.value
|
||||
|
@ -22,14 +22,14 @@ class EditTimeZoneDialog(val activity: SimpleActivity, val myTimeZone: MyTimeZon
|
|||
edit_time_zone_value.text = getDefaultTimeZoneTitle(myTimeZone.id)
|
||||
}
|
||||
|
||||
AlertDialog.Builder(activity)
|
||||
.setPositiveButton(R.string.ok, { dialog, which -> dialogConfirmed(view.edit_time_zone_title.value) })
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
.create().apply {
|
||||
activity.setupDialogStuff(view, this) {
|
||||
showKeyboard(view.edit_time_zone_title)
|
||||
}
|
||||
activity.getAlertDialogBuilder()
|
||||
.setPositiveButton(R.string.ok) { dialog, which -> dialogConfirmed(view.edit_time_zone_title.value) }
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
.apply {
|
||||
activity.setupDialogStuff(view, this) { alertDialog ->
|
||||
alertDialog.showKeyboard(view.edit_time_zone_title)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun dialogConfirmed(newTitle: String) {
|
||||
|
|
|
@ -63,17 +63,17 @@ class EditTimerDialog(val activity: SimpleActivity, val timer: Timer, val callba
|
|||
|
||||
}
|
||||
|
||||
AlertDialog.Builder(activity)
|
||||
activity.getAlertDialogBuilder()
|
||||
.setPositiveButton(R.string.ok, null)
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
.create().apply {
|
||||
activity.setupDialogStuff(view, this) {
|
||||
getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener {
|
||||
.apply {
|
||||
activity.setupDialogStuff(view, this) { alertDialog ->
|
||||
alertDialog.getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener {
|
||||
timer.label = view.edit_timer_label.value
|
||||
activity.timerHelper.insertOrUpdateTimer(timer) {
|
||||
activity.config.timerLastConfig = timer
|
||||
callback()
|
||||
dismiss()
|
||||
alertDialog.dismiss()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package com.simplemobiletools.clock.dialogs
|
||||
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import com.simplemobiletools.clock.R
|
||||
import com.simplemobiletools.clock.activities.SimpleActivity
|
||||
import com.simplemobiletools.commons.extensions.getAlertDialogBuilder
|
||||
import com.simplemobiletools.commons.extensions.getProperTextColor
|
||||
import com.simplemobiletools.commons.extensions.setupDialogStuff
|
||||
import kotlinx.android.synthetic.main.dialog_my_time_picker.view.*
|
||||
|
@ -24,10 +24,10 @@ class MyTimePickerDialogDialog(val activity: SimpleActivity, val initialSeconds:
|
|||
my_time_picker_seconds.value = initialSeconds % 60
|
||||
}
|
||||
|
||||
AlertDialog.Builder(activity)
|
||||
activity.getAlertDialogBuilder()
|
||||
.setPositiveButton(R.string.ok) { dialog, which -> dialogConfirmed() }
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
.create().apply {
|
||||
.apply {
|
||||
activity.setupDialogStuff(view, this)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue