Fix next alarm clock UI

This commit is contained in:
Tommaso Berlose
2020-05-04 17:34:44 +02:00
parent 614d001df8
commit 9d72c168b6
10 changed files with 66 additions and 66 deletions

View File

@ -34,7 +34,7 @@ class AWApplication : Application() {
private fun calibrateVersions() {
// 2.0 Tolerance
if (Preferences.clockTextSize > 50f) {
Preferences.clockTextSize = 46f
Preferences.clockTextSize = 32f
}
if (Preferences.textMainSize > 36f) {

View File

@ -116,6 +116,14 @@ class ClockSettingsFragment : Fragment() {
}.show()
}
action_clock_app.setOnClickListener {
if (Preferences.showClock) {
startActivityForResult(Intent(requireContext(), ChooseApplicationActivity::class.java),
RequestCode.CLOCK_APP_REQUEST_CODE.code
)
}
}
action_show_next_alarm.setOnClickListener {
BottomSheetMenu<Boolean>(requireContext(), header = getString(R.string.settings_show_next_alarm_title)).setSelectedValue(Preferences.showNextAlarm)
.addItem(getString(R.string.settings_visible), true)
@ -124,14 +132,6 @@ class ClockSettingsFragment : Fragment() {
Preferences.showNextAlarm = value
}.show()
}
action_clock_app.setOnClickListener {
if (Preferences.showClock) {
startActivityForResult(Intent(requireContext(), ChooseApplicationActivity::class.java),
RequestCode.CLOCK_APP_REQUEST_CODE.code
)
}
}
}
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {