redesigning the app settings

This commit is contained in:
tibbi 2021-11-19 16:16:37 +01:00
parent 2699572f0e
commit adac520044
2 changed files with 345 additions and 344 deletions

View File

@ -38,18 +38,40 @@ class SettingsActivity : SimpleActivity() {
setupUseTextShadow() setupUseTextShadow()
setupCustomizeWidgetColors() setupCustomizeWidgetColors()
updateTextColors(settings_holder) updateTextColors(settings_holder)
setupSectionColors()
}
private fun setupSectionColors() { arrayOf(
val adjustedPrimaryColor = getAdjustedPrimaryColor() settings_color_customization_label,
arrayListOf(clock_tab_label, alarm_tab_label, stopwatch_tab_label, timer_tab_label, widgets_label).forEach { settings_general_settings_label,
it.setTextColor(adjustedPrimaryColor) settings_clock_tab_label,
settings_alarm_tab_label,
settings_stopwatch_tab_label,
settings_timer_tab_label,
settings_widgets_label
).forEach {
it.setTextColor(getAdjustedPrimaryColor())
}
arrayOf(
settings_color_customization_holder,
settings_general_settings_holder,
settings_clock_tab_holder,
settings_alarm_tab_holder,
settings_stopwatch_tab_holder,
settings_timer_tab_holder,
settings_widgets_holder
).forEach {
it.background.applyColorFilter(baseConfig.backgroundColor.getContrastColor())
} }
} }
private fun setupPurchaseThankYou() { private fun setupPurchaseThankYou() {
settings_purchase_thank_you_holder.beGoneIf(isOrWasThankYouInstalled()) settings_purchase_thank_you_holder.beGoneIf(isOrWasThankYouInstalled())
// make sure the corners at ripple fit the stroke rounded corners
if (settings_purchase_thank_you_holder.isGone()) {
settings_use_english_holder.background = resources.getDrawable(R.drawable.ripple_top_corners, theme)
}
settings_purchase_thank_you_holder.setOnClickListener { settings_purchase_thank_you_holder.setOnClickListener {
launchPurchaseThankYouIntent() launchPurchaseThankYouIntent()
} }
@ -65,6 +87,11 @@ class SettingsActivity : SimpleActivity() {
private fun setupUseEnglish() { private fun setupUseEnglish() {
settings_use_english_holder.beVisibleIf(config.wasUseEnglishToggled || Locale.getDefault().language != "en") settings_use_english_holder.beVisibleIf(config.wasUseEnglishToggled || Locale.getDefault().language != "en")
settings_use_english.isChecked = config.useEnglish settings_use_english.isChecked = config.useEnglish
if (settings_use_english_holder.isGone() && settings_purchase_thank_you_holder.isGone()) {
settings_prevent_phone_from_sleeping_holder.background = resources.getDrawable(R.drawable.ripple_top_corners, theme)
}
settings_use_english_holder.setOnClickListener { settings_use_english_holder.setOnClickListener {
settings_use_english.toggle() settings_use_english.toggle()
config.useEnglish = settings_use_english.isChecked config.useEnglish = settings_use_english.isChecked
@ -118,13 +145,25 @@ class SettingsActivity : SimpleActivity() {
private fun setupUseSameSnooze() { private fun setupUseSameSnooze() {
settings_snooze_time_holder.beVisibleIf(config.useSameSnooze) settings_snooze_time_holder.beVisibleIf(config.useSameSnooze)
settings_use_same_snooze.isChecked = config.useSameSnooze settings_use_same_snooze.isChecked = config.useSameSnooze
checkSnoozeButtonBackgrounds()
settings_use_same_snooze_holder.setOnClickListener { settings_use_same_snooze_holder.setOnClickListener {
settings_use_same_snooze.toggle() settings_use_same_snooze.toggle()
config.useSameSnooze = settings_use_same_snooze.isChecked config.useSameSnooze = settings_use_same_snooze.isChecked
settings_snooze_time_holder.beVisibleIf(config.useSameSnooze) settings_snooze_time_holder.beVisibleIf(config.useSameSnooze)
checkSnoozeButtonBackgrounds()
} }
} }
private fun checkSnoozeButtonBackgrounds() {
val backgroundId = if (settings_use_same_snooze.isChecked) {
R.drawable.ripple_background
} else {
R.drawable.ripple_bottom_corners
}
settings_use_same_snooze_holder.background = resources.getDrawable(backgroundId, theme)
}
private fun setupSnoozeTime() { private fun setupSnoozeTime() {
updateSnoozeText() updateSnoozeText()
settings_snooze_time_holder.setOnClickListener { settings_snooze_time_holder.setOnClickListener {

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/settings_scrollview" android:id="@+id/settings_scrollview"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
@ -11,418 +11,380 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<RelativeLayout <TextView
android:id="@+id/settings_purchase_thank_you_holder" android:id="@+id/settings_color_customization_label"
style="@style/SettingsSectionLabelStyle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin" android:text="@string/color_customization" />
android:background="?attr/selectableItemBackground"
android:paddingLeft="@dimen/normal_margin"
android:paddingTop="@dimen/activity_margin"
android:paddingRight="@dimen/normal_margin"
android:paddingBottom="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MyTextView <LinearLayout
android:id="@+id/settings_purchase_thank_you" android:id="@+id/settings_color_customization_holder"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:paddingStart="@dimen/medium_margin"
android:text="@string/purchase_simple_thank_you" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_customize_colors_holder"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin" android:layout_margin="@dimen/medium_margin"
android:background="?attr/selectableItemBackground" android:background="@drawable/section_holder_stroke"
android:paddingLeft="@dimen/normal_margin" android:orientation="vertical">
android:paddingTop="@dimen/activity_margin"
android:paddingRight="@dimen/normal_margin"
android:paddingBottom="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MyTextView <RelativeLayout
android:id="@+id/settings_customize_colors_label" android:id="@+id/settings_customize_colors_holder"
android:layout_width="wrap_content" style="@style/SettingsHolderTextViewOneLinerStyle"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:paddingStart="@dimen/medium_margin"
android:text="@string/customize_colors" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_use_english_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin"
android:background="?attr/selectableItemBackground"
android:paddingLeft="@dimen/normal_margin"
android:paddingTop="@dimen/activity_margin"
android:paddingRight="@dimen/normal_margin"
android:paddingBottom="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MySwitchCompat
android:id="@+id/settings_use_english"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@null" android:background="@drawable/ripple_top_corners">
android:clickable="false"
android:paddingStart="@dimen/medium_margin"
android:text="@string/use_english_language"
app:switchPadding="@dimen/medium_margin" />
</RelativeLayout> <com.simplemobiletools.commons.views.MyTextView
android:id="@+id/settings_customize_colors_label"
style="@style/SettingsTextLabelStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/customize_colors" />
<RelativeLayout </RelativeLayout>
android:id="@+id/settings_prevent_phone_from_sleeping_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin"
android:background="?attr/selectableItemBackground"
android:paddingLeft="@dimen/normal_margin"
android:paddingTop="@dimen/activity_margin"
android:paddingRight="@dimen/normal_margin"
android:paddingBottom="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MySwitchCompat <RelativeLayout
android:id="@+id/settings_prevent_phone_from_sleeping" android:id="@+id/settings_customize_widget_colors_holder"
style="@style/SettingsHolderTextViewOneLinerStyle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@null" android:background="@drawable/ripple_bottom_corners">
android:clickable="false"
android:paddingStart="@dimen/medium_margin"
android:text="@string/prevent_phone_from_sleeping"
app:switchPadding="@dimen/medium_margin" />
</RelativeLayout> <com.simplemobiletools.commons.views.MyTextView
android:id="@+id/settings_customize_widget_colors_label"
style="@style/SettingsTextLabelStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/customize_widget_colors" />
<RelativeLayout </RelativeLayout>
android:id="@+id/settings_hour_format_holder" </LinearLayout>
<TextView
android:id="@+id/settings_general_settings_label"
style="@style/SettingsSectionLabelStyle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin" android:text="@string/general_settings" />
android:background="?attr/selectableItemBackground"
android:paddingLeft="@dimen/normal_margin"
android:paddingTop="@dimen/activity_margin"
android:paddingRight="@dimen/normal_margin"
android:paddingBottom="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MySwitchCompat <LinearLayout
android:id="@+id/settings_hour_format" android:id="@+id/settings_general_settings_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/medium_margin"
android:background="@drawable/section_holder_stroke"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/settings_purchase_thank_you_holder"
style="@style/SettingsHolderTextViewOneLinerStyle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@null" android:background="@drawable/ripple_top_corners">
android:clickable="false"
android:paddingStart="@dimen/medium_margin"
android:text="@string/use_24_hour_time_format"
app:switchPadding="@dimen/medium_margin" />
</RelativeLayout> <com.simplemobiletools.commons.views.MyTextView
android:id="@+id/settings_purchase_thank_you_label"
style="@style/SettingsTextLabelStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/purchase_simple_thank_you" />
<RelativeLayout </RelativeLayout>
android:id="@+id/settings_sunday_first_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin"
android:background="?attr/selectableItemBackground"
android:paddingLeft="@dimen/normal_margin"
android:paddingTop="@dimen/activity_margin"
android:paddingRight="@dimen/normal_margin"
android:paddingBottom="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MySwitchCompat <RelativeLayout
android:id="@+id/settings_sunday_first" android:id="@+id/settings_use_english_holder"
style="@style/SettingsHolderCheckboxStyle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@null" android:background="@drawable/ripple_background">
android:clickable="false"
android:paddingStart="@dimen/medium_margin"
android:text="@string/sunday_first"
app:switchPadding="@dimen/medium_margin" />
</RelativeLayout> <com.simplemobiletools.commons.views.MyAppCompatCheckbox
android:id="@+id/settings_use_english"
style="@style/SettingsCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/use_english_language" />
<com.simplemobiletools.commons.views.MyTextView </RelativeLayout>
android:id="@+id/clock_tab_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/bigger_margin"
android:layout_marginTop="@dimen/section_margin"
android:text="@string/clock_tab"
android:textAllCaps="true"
android:textSize="@dimen/smaller_text_size" />
<RelativeLayout <RelativeLayout
android:id="@+id/settings_show_seconds_holder" android:id="@+id/settings_prevent_phone_from_sleeping_holder"
android:layout_width="match_parent" style="@style/SettingsHolderCheckboxStyle"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin"
android:background="?attr/selectableItemBackground"
android:paddingLeft="@dimen/normal_margin"
android:paddingTop="@dimen/activity_margin"
android:paddingRight="@dimen/normal_margin"
android:paddingBottom="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MySwitchCompat
android:id="@+id/settings_show_seconds"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@null" android:background="@drawable/ripple_background">
android:clickable="false"
android:paddingStart="@dimen/medium_margin"
android:text="@string/show_seconds"
app:switchPadding="@dimen/medium_margin" />
</RelativeLayout> <com.simplemobiletools.commons.views.MyAppCompatCheckbox
android:id="@+id/settings_prevent_phone_from_sleeping"
style="@style/SettingsCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/prevent_phone_from_sleeping" />
<com.simplemobiletools.commons.views.MyTextView </RelativeLayout>
android:id="@+id/alarm_tab_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/bigger_margin"
android:layout_marginTop="@dimen/section_margin"
android:text="@string/alarm_tab"
android:textAllCaps="true"
android:textSize="@dimen/smaller_text_size" />
<RelativeLayout <RelativeLayout
android:id="@+id/settings_alarm_max_reminder_holder" android:id="@+id/settings_hour_format_holder"
android:layout_width="match_parent" style="@style/SettingsHolderCheckboxStyle"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin"
android:background="?attr/selectableItemBackground"
android:paddingLeft="@dimen/normal_margin"
android:paddingTop="@dimen/bigger_margin"
android:paddingRight="@dimen/normal_margin"
android:paddingBottom="@dimen/bigger_margin">
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/settings_alarm_max_reminder_label"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:background="@drawable/ripple_background">
android:layout_toStartOf="@+id/settings_alarm_max_reminder"
android:paddingLeft="@dimen/medium_margin"
android:paddingRight="@dimen/medium_margin"
android:text="@string/max_reminder_duration" />
<com.simplemobiletools.commons.views.MyTextView <com.simplemobiletools.commons.views.MyAppCompatCheckbox
android:id="@+id/settings_alarm_max_reminder" android:id="@+id/settings_hour_format"
android:layout_width="wrap_content" style="@style/SettingsCheckboxStyle"
android:layout_height="wrap_content" android:layout_width="match_parent"
android:layout_alignParentEnd="true" android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/small_margin" android:text="@string/use_24_hour_time_format" />
android:background="@null"
android:clickable="false" />
</RelativeLayout> </RelativeLayout>
<RelativeLayout <RelativeLayout
android:id="@+id/settings_increase_volume_gradually_holder" android:id="@+id/settings_sunday_first_holder"
android:layout_width="match_parent" style="@style/SettingsHolderCheckboxStyle"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin"
android:background="?attr/selectableItemBackground"
android:paddingLeft="@dimen/normal_margin"
android:paddingTop="@dimen/activity_margin"
android:paddingRight="@dimen/normal_margin"
android:paddingBottom="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MySwitchCompat
android:id="@+id/settings_increase_volume_gradually"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@null" android:background="@drawable/ripple_bottom_corners">
android:clickable="false"
android:paddingStart="@dimen/medium_margin"
android:text="@string/increase_volume_gradually"
app:switchPadding="@dimen/medium_margin" />
</RelativeLayout> <com.simplemobiletools.commons.views.MyAppCompatCheckbox
android:id="@+id/settings_sunday_first"
style="@style/SettingsCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/sunday_first" />
<RelativeLayout </RelativeLayout>
android:id="@+id/settings_use_same_snooze_holder" </LinearLayout>
<TextView
android:id="@+id/settings_clock_tab_label"
style="@style/SettingsSectionLabelStyle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin" android:text="@string/clock_tab" />
android:background="?attr/selectableItemBackground"
android:paddingLeft="@dimen/normal_margin"
android:paddingTop="@dimen/activity_margin"
android:paddingRight="@dimen/normal_margin"
android:paddingBottom="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MySwitchCompat <LinearLayout
android:id="@+id/settings_use_same_snooze" android:id="@+id/settings_clock_tab_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/medium_margin"
android:background="@drawable/section_holder_stroke"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/settings_show_seconds_holder"
style="@style/SettingsHolderCheckboxStyle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@null" android:background="@drawable/ripple_all_corners">
android:clickable="false"
android:paddingStart="@dimen/medium_margin"
android:text="@string/use_same_snooze"
app:switchPadding="@dimen/medium_margin" />
</RelativeLayout> <com.simplemobiletools.commons.views.MyAppCompatCheckbox
android:id="@+id/settings_show_seconds"
style="@style/SettingsCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/show_seconds" />
<RelativeLayout </RelativeLayout>
android:id="@+id/settings_snooze_time_holder" </LinearLayout>
<TextView
android:id="@+id/settings_alarm_tab_label"
style="@style/SettingsSectionLabelStyle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin" android:text="@string/alarm_tab" />
android:background="?attr/selectableItemBackground"
android:paddingLeft="@dimen/normal_margin"
android:paddingTop="@dimen/bigger_margin"
android:paddingRight="@dimen/normal_margin"
android:paddingBottom="@dimen/bigger_margin">
<com.simplemobiletools.commons.views.MyTextView <LinearLayout
android:id="@+id/settings_snooze_time_label" android:id="@+id/settings_alarm_tab_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/medium_margin"
android:background="@drawable/section_holder_stroke"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/settings_alarm_max_reminder_holder"
style="@style/SettingsHolderTextViewStyle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:background="@drawable/ripple_top_corners">
android:layout_toStartOf="@+id/settings_snooze_time"
android:paddingLeft="@dimen/medium_margin"
android:paddingRight="@dimen/medium_margin"
android:text="@string/snooze_time" />
<com.simplemobiletools.commons.views.MyTextView <com.simplemobiletools.commons.views.MyTextView
android:id="@+id/settings_snooze_time" android:id="@+id/settings_alarm_max_reminder_label"
android:layout_width="wrap_content" style="@style/SettingsTextLabelStyle"
android:layout_height="wrap_content" android:layout_width="wrap_content"
android:layout_alignParentEnd="true" android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/small_margin" android:text="@string/max_reminder_duration" />
android:background="@null"
android:clickable="false" />
</RelativeLayout> <com.simplemobiletools.commons.views.MyTextView
android:id="@+id/settings_alarm_max_reminder"
style="@style/SettingsTextValueStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/settings_alarm_max_reminder_label"
tools:text="5 minutes" />
<com.simplemobiletools.commons.views.MyTextView </RelativeLayout>
android:id="@+id/stopwatch_tab_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/bigger_margin"
android:layout_marginTop="@dimen/section_margin"
android:text="@string/stopwatch_tab"
android:textAllCaps="true"
android:textSize="@dimen/smaller_text_size" />
<RelativeLayout <RelativeLayout
android:id="@+id/settings_vibrate_holder" android:id="@+id/settings_increase_volume_gradually_holder"
android:layout_width="match_parent" style="@style/SettingsHolderCheckboxStyle"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin"
android:background="?attr/selectableItemBackground"
android:paddingLeft="@dimen/normal_margin"
android:paddingTop="@dimen/activity_margin"
android:paddingRight="@dimen/normal_margin"
android:paddingBottom="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MySwitchCompat
android:id="@+id/settings_vibrate"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@null" android:background="@drawable/ripple_background">
android:clickable="false"
android:paddingStart="@dimen/medium_margin"
android:text="@string/vibrate_on_button_press"
app:switchPadding="@dimen/medium_margin" />
</RelativeLayout>
<com.simplemobiletools.commons.views.MyTextView <com.simplemobiletools.commons.views.MyAppCompatCheckbox
android:id="@+id/timer_tab_label" android:id="@+id/settings_increase_volume_gradually"
android:layout_width="wrap_content" style="@style/SettingsCheckboxStyle"
android:layout_height="wrap_content" android:layout_width="match_parent"
android:layout_marginStart="@dimen/bigger_margin" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/section_margin" android:text="@string/increase_volume_gradually" />
android:text="@string/timer_tab"
android:textAllCaps="true"
android:textSize="@dimen/smaller_text_size" />
<RelativeLayout </RelativeLayout>
android:id="@+id/settings_timer_max_reminder_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin"
android:background="?attr/selectableItemBackground"
android:paddingLeft="@dimen/normal_margin"
android:paddingTop="@dimen/bigger_margin"
android:paddingRight="@dimen/normal_margin"
android:paddingBottom="@dimen/bigger_margin">
<com.simplemobiletools.commons.views.MyTextView <RelativeLayout
android:id="@+id/settings_timer_max_reminder_label" android:id="@+id/settings_use_same_snooze_holder"
style="@style/SettingsHolderCheckboxStyle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:background="@drawable/ripple_background">
android:layout_toStartOf="@+id/settings_timer_max_reminder"
android:paddingLeft="@dimen/medium_margin"
android:paddingRight="@dimen/medium_margin"
android:text="@string/max_reminder_duration" />
<com.simplemobiletools.commons.views.MyTextView <com.simplemobiletools.commons.views.MyAppCompatCheckbox
android:id="@+id/settings_timer_max_reminder" android:id="@+id/settings_use_same_snooze"
android:layout_width="wrap_content" style="@style/SettingsCheckboxStyle"
android:layout_height="wrap_content" android:layout_width="match_parent"
android:layout_alignParentEnd="true" android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/small_margin" android:text="@string/use_same_snooze" />
android:background="@null"
android:clickable="false" />
</RelativeLayout> </RelativeLayout>
<com.simplemobiletools.commons.views.MyTextView <RelativeLayout
android:id="@+id/widgets_label" android:id="@+id/settings_snooze_time_holder"
android:layout_width="wrap_content" style="@style/SettingsHolderTextViewStyle"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/bigger_margin"
android:layout_marginTop="@dimen/section_margin"
android:text="@string/widgets"
android:textAllCaps="true"
android:textSize="@dimen/smaller_text_size" />
<RelativeLayout
android:id="@+id/settings_use_text_shadow_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin"
android:background="?attr/selectableItemBackground"
android:paddingLeft="@dimen/normal_margin"
android:paddingTop="@dimen/activity_margin"
android:paddingRight="@dimen/normal_margin"
android:paddingBottom="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MySwitchCompat
android:id="@+id/settings_use_text_shadow"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@null" android:background="@drawable/ripple_bottom_corners">
android:clickable="false"
android:paddingStart="@dimen/medium_margin"
android:text="@string/use_text_shadow"
app:switchPadding="@dimen/medium_margin" />
</RelativeLayout>
<RelativeLayout <com.simplemobiletools.commons.views.MyTextView
android:id="@+id/settings_customize_widget_colors_holder" android:id="@+id/settings_snooze_time_label"
style="@style/SettingsTextLabelStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/snooze_time" />
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/settings_snooze_time"
style="@style/SettingsTextValueStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/settings_snooze_time_label"
tools:text="10 minutes" />
</RelativeLayout>
</LinearLayout>
<TextView
android:id="@+id/settings_stopwatch_tab_label"
style="@style/SettingsSectionLabelStyle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin" android:text="@string/stopwatch_tab" />
android:background="?attr/selectableItemBackground"
android:paddingLeft="@dimen/normal_margin"
android:paddingTop="@dimen/activity_margin"
android:paddingRight="@dimen/normal_margin"
android:paddingBottom="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MyTextView <LinearLayout
android:id="@+id/settings_customize_widget_colors_label" android:id="@+id/settings_stopwatch_tab_holder"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/medium_margin"
android:background="@drawable/section_holder_stroke"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/settings_vibrate_holder"
style="@style/SettingsHolderCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:background="@drawable/ripple_all_corners">
android:paddingStart="@dimen/medium_margin"
android:text="@string/customize_widget_colors" />
</RelativeLayout> <com.simplemobiletools.commons.views.MyAppCompatCheckbox
android:id="@+id/settings_vibrate"
style="@style/SettingsCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/vibrate_on_button_press" />
</RelativeLayout>
</LinearLayout>
<TextView
android:id="@+id/settings_timer_tab_label"
style="@style/SettingsSectionLabelStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/timer_tab" />
<LinearLayout
android:id="@+id/settings_timer_tab_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/medium_margin"
android:background="@drawable/section_holder_stroke"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/settings_timer_max_reminder_holder"
style="@style/SettingsHolderTextViewStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/ripple_all_corners">
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/settings_timer_max_reminder_label"
style="@style/SettingsTextLabelStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/max_reminder_duration" />
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/settings_timer_max_reminder"
style="@style/SettingsTextValueStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/settings_timer_max_reminder_label"
tools:text="1 minute" />
</RelativeLayout>
</LinearLayout>
<TextView
android:id="@+id/settings_widgets_label"
style="@style/SettingsSectionLabelStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/widgets" />
<LinearLayout
android:id="@+id/settings_widgets_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/medium_margin"
android:background="@drawable/section_holder_stroke"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/settings_use_text_shadow_holder"
style="@style/SettingsHolderCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/ripple_all_corners">
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
android:id="@+id/settings_use_text_shadow"
style="@style/SettingsCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/use_text_shadow" />
</RelativeLayout>
</LinearLayout>
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>