Double-tap on the capitalize icon to set the date to uppercase

This commit is contained in:
Tommaso Berlose 2020-05-22 19:25:34 +02:00
parent fa366b3d45
commit 704448a848
4 changed files with 14 additions and 10 deletions

Binary file not shown.

View File

@ -18,7 +18,7 @@ android {
applicationId "com.tommasoberlose.anotherwidget" applicationId "com.tommasoberlose.anotherwidget"
minSdkVersion 23 minSdkVersion 23
targetSdkVersion 29 targetSdkVersion 29
versionCode 101 versionCode 102
versionName "2.0.12" versionName "2.0.12"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

Binary file not shown.

View File

@ -255,17 +255,21 @@ class GeneralTabFragment : Fragment() {
dialog.addItem(getString(R.string.custom_date_format), "-") dialog.addItem(getString(R.string.custom_date_format), "-")
dialog.addOnSelectItemListener { value -> dialog.addOnSelectItemListener { value ->
if (value == "-") { when (value) {
"-" -> {
startActivity(Intent(requireContext(), CustomDateActivity::class.java)) startActivity(Intent(requireContext(), CustomDateActivity::class.java))
} else if (value == "") { }
"" -> {
Preferences.blockingBulk { Preferences.blockingBulk {
isDateCapitalize = false isDateCapitalize = false
isDateUppercase = false isDateUppercase = false
} }
Preferences.dateFormat = value Preferences.dateFormat = value
} else { }
else -> {
Preferences.dateFormat = value Preferences.dateFormat = value
} }
}
}.show() }.show()
} }