Fix #133
This commit is contained in:
parent
2ac7e072e5
commit
66ad5e0839
BIN
.idea/caches/build_file_checksums.ser
generated
BIN
.idea/caches/build_file_checksums.ser
generated
Binary file not shown.
@ -18,7 +18,7 @@ android {
|
|||||||
applicationId "com.tommasoberlose.anotherwidget"
|
applicationId "com.tommasoberlose.anotherwidget"
|
||||||
minSdkVersion 23
|
minSdkVersion 23
|
||||||
targetSdkVersion 29
|
targetSdkVersion 29
|
||||||
versionCode 97
|
versionCode 98
|
||||||
versionName "2.0.10"
|
versionName "2.0.10"
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
@ -251,24 +251,22 @@ class GeneralTabFragment : Fragment() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
action_date_format.setOnClickListener {
|
action_date_format.setOnClickListener {
|
||||||
if (Preferences.showEvents) {
|
val now = Calendar.getInstance()
|
||||||
val now = Calendar.getInstance()
|
val dialog = BottomSheetMenu<String>(requireContext(), header = getString(R.string.settings_date_format_title)).setSelectedValue(Preferences.dateFormat)
|
||||||
val dialog = BottomSheetMenu<String>(requireContext(), header = getString(R.string.settings_date_format_title)).setSelectedValue(Preferences.dateFormat)
|
|
||||||
|
|
||||||
dialog.addItem(DateHelper.getDefaultDateText(requireContext(), now), "")
|
dialog.addItem(DateHelper.getDefaultDateText(requireContext(), now), "")
|
||||||
if (Preferences.dateFormat != "") {
|
if (Preferences.dateFormat != "") {
|
||||||
dialog.addItem(DateHelper.getDateText(requireContext(), now), Preferences.dateFormat)
|
dialog.addItem(DateHelper.getDateText(requireContext(), now), Preferences.dateFormat)
|
||||||
}
|
|
||||||
dialog.addItem(getString(R.string.custom_date_format), "-")
|
|
||||||
|
|
||||||
dialog.addOnSelectItemListener { value ->
|
|
||||||
if (value == "-") {
|
|
||||||
startActivity(Intent(requireContext(), CustomDateActivity::class.java))
|
|
||||||
} else {
|
|
||||||
Preferences.dateFormat = value
|
|
||||||
}
|
|
||||||
}.show()
|
|
||||||
}
|
}
|
||||||
|
dialog.addItem(getString(R.string.custom_date_format), "-")
|
||||||
|
|
||||||
|
dialog.addOnSelectItemListener { value ->
|
||||||
|
if (value == "-") {
|
||||||
|
startActivity(Intent(requireContext(), CustomDateActivity::class.java))
|
||||||
|
} else {
|
||||||
|
Preferences.dateFormat = value
|
||||||
|
}
|
||||||
|
}.show()
|
||||||
}
|
}
|
||||||
|
|
||||||
action_background_color.setOnClickListener {
|
action_background_color.setOnClickListener {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user