mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-03-24 04:20:07 +01:00
redesigning the app settings
This commit is contained in:
parent
fa938fe792
commit
80ae64ca4b
@ -4,10 +4,7 @@ import android.content.Intent
|
|||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.Menu
|
import android.view.Menu
|
||||||
import com.simplemobiletools.commons.dialogs.RadioGroupDialog
|
import com.simplemobiletools.commons.dialogs.RadioGroupDialog
|
||||||
import com.simplemobiletools.commons.extensions.beGone
|
import com.simplemobiletools.commons.extensions.*
|
||||||
import com.simplemobiletools.commons.extensions.beVisibleIf
|
|
||||||
import com.simplemobiletools.commons.extensions.getAdjustedPrimaryColor
|
|
||||||
import com.simplemobiletools.commons.extensions.updateTextColors
|
|
||||||
import com.simplemobiletools.commons.helpers.IS_CUSTOMIZING_COLORS
|
import com.simplemobiletools.commons.helpers.IS_CUSTOMIZING_COLORS
|
||||||
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
|
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
|
||||||
import com.simplemobiletools.commons.helpers.isOreoPlus
|
import com.simplemobiletools.commons.helpers.isOreoPlus
|
||||||
@ -46,9 +43,27 @@ class SettingsActivity : SimpleActivity() {
|
|||||||
setupIncognitoMode()
|
setupIncognitoMode()
|
||||||
setupCustomizeWidgetColors()
|
setupCustomizeWidgetColors()
|
||||||
updateTextColors(settings_scrollview)
|
updateTextColors(settings_scrollview)
|
||||||
setupSectionColors()
|
|
||||||
setupAddNewChecklistItemsTop()
|
|
||||||
invalidateOptionsMenu()
|
invalidateOptionsMenu()
|
||||||
|
|
||||||
|
arrayOf(
|
||||||
|
settings_color_customization_label,
|
||||||
|
settings_general_settings_label,
|
||||||
|
settings_text_label,
|
||||||
|
settings_startup_label,
|
||||||
|
settings_saving_label
|
||||||
|
).forEach {
|
||||||
|
it.setTextColor(getAdjustedPrimaryColor())
|
||||||
|
}
|
||||||
|
|
||||||
|
arrayOf(
|
||||||
|
settings_color_customization_holder,
|
||||||
|
settings_general_settings_holder,
|
||||||
|
settings_text_holder,
|
||||||
|
settings_startup_holder,
|
||||||
|
settings_saving_holder
|
||||||
|
).forEach {
|
||||||
|
it.background.applyColorFilter(baseConfig.backgroundColor.getContrastColor())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
||||||
@ -56,13 +71,6 @@ class SettingsActivity : SimpleActivity() {
|
|||||||
return super.onCreateOptionsMenu(menu)
|
return super.onCreateOptionsMenu(menu)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupSectionColors() {
|
|
||||||
val adjustedPrimaryColor = getAdjustedPrimaryColor()
|
|
||||||
arrayListOf(text_label, startup_label, saving_label, widgets_label).forEach {
|
|
||||||
it.setTextColor(adjustedPrimaryColor)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun setupCustomizeColors() {
|
private fun setupCustomizeColors() {
|
||||||
settings_customize_colors_holder.setOnClickListener {
|
settings_customize_colors_holder.setOnClickListener {
|
||||||
startCustomizationActivity()
|
startCustomizationActivity()
|
||||||
@ -72,6 +80,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_font_size_holder.background = resources.getDrawable(R.drawable.ripple_all_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
|
||||||
@ -123,6 +136,10 @@ class SettingsActivity : SimpleActivity() {
|
|||||||
private fun setupShowNotePicker() {
|
private fun setupShowNotePicker() {
|
||||||
NotesHelper(this).getNotes {
|
NotesHelper(this).getNotes {
|
||||||
settings_show_note_picker_holder.beVisibleIf(it.size > 1)
|
settings_show_note_picker_holder.beVisibleIf(it.size > 1)
|
||||||
|
|
||||||
|
if (settings_show_note_picker_holder.isGone()) {
|
||||||
|
settings_show_keyboard_holder.background = resources.getDrawable(R.drawable.ripple_bottom_corners, theme)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
settings_show_note_picker.isChecked = config.showNotePicker
|
settings_show_note_picker.isChecked = config.showNotePicker
|
||||||
@ -181,7 +198,8 @@ class SettingsActivity : SimpleActivity() {
|
|||||||
val items = arrayListOf(
|
val items = arrayListOf(
|
||||||
RadioItem(GRAVITY_LEFT, getString(R.string.left)),
|
RadioItem(GRAVITY_LEFT, getString(R.string.left)),
|
||||||
RadioItem(GRAVITY_CENTER, getString(R.string.center)),
|
RadioItem(GRAVITY_CENTER, getString(R.string.center)),
|
||||||
RadioItem(GRAVITY_RIGHT, getString(R.string.right)))
|
RadioItem(GRAVITY_RIGHT, getString(R.string.right))
|
||||||
|
)
|
||||||
|
|
||||||
RadioGroupDialog(this@SettingsActivity, items, config.gravity) {
|
RadioGroupDialog(this@SettingsActivity, items, config.gravity) {
|
||||||
config.gravity = it as Int
|
config.gravity = it as Int
|
||||||
@ -191,11 +209,13 @@ class SettingsActivity : SimpleActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getGravityText() = getString(when (config.gravity) {
|
private fun getGravityText() = getString(
|
||||||
GRAVITY_LEFT -> R.string.left
|
when (config.gravity) {
|
||||||
GRAVITY_CENTER -> R.string.center
|
GRAVITY_LEFT -> R.string.left
|
||||||
else -> R.string.right
|
GRAVITY_CENTER -> R.string.center
|
||||||
})
|
else -> R.string.right
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
private fun setupCursorPlacement() {
|
private fun setupCursorPlacement() {
|
||||||
settings_cursor_placement.isChecked = config.placeCursorToEnd
|
settings_cursor_placement.isChecked = config.placeCursorToEnd
|
||||||
@ -230,9 +250,8 @@ class SettingsActivity : SimpleActivity() {
|
|||||||
if (widgets.size == 1) {
|
if (widgets.size == 1) {
|
||||||
widgetToCustomize = widgets.first()
|
widgetToCustomize = widgets.first()
|
||||||
} else if (widgets.size > 1) {
|
} else if (widgets.size > 1) {
|
||||||
arrayListOf(widgets_label, settings_customize_widget_colors_holder).forEach {
|
settings_customize_widget_colors_holder.beGone()
|
||||||
it.beGone()
|
settings_customize_colors_holder.background = resources.getDrawable(R.drawable.ripple_all_corners, theme)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -245,12 +264,4 @@ class SettingsActivity : SimpleActivity() {
|
|||||||
config.useIncognitoMode = settings_use_incognito_mode.isChecked
|
config.useIncognitoMode = settings_use_incognito_mode.isChecked
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupAddNewChecklistItemsTop() {
|
|
||||||
settings_add_checklist_top.isChecked = config.addNewChecklistItemsTop
|
|
||||||
settings_add_checklist_top_holder.setOnClickListener {
|
|
||||||
settings_add_checklist_top.toggle()
|
|
||||||
config.addNewChecklistItemsTop = settings_add_checklist_top.isChecked
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -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,426 +11,340 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<RelativeLayout
|
<TextView
|
||||||
android:id="@+id/settings_customize_colors_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:paddingStart="@dimen/normal_margin"
|
|
||||||
android:paddingTop="@dimen/activity_margin"
|
|
||||||
android:paddingEnd="@dimen/normal_margin"
|
|
||||||
android:paddingBottom="@dimen/activity_margin">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
<LinearLayout
|
||||||
android:id="@+id/settings_customize_colors_label"
|
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/customize_colors" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:id="@+id/settings_use_english_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:paddingStart="@dimen/normal_margin"
|
android:orientation="vertical">
|
||||||
android:paddingTop="@dimen/activity_margin"
|
|
||||||
android:paddingEnd="@dimen/normal_margin"
|
|
||||||
android:paddingBottom="@dimen/activity_margin">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MySwitchCompat
|
<RelativeLayout
|
||||||
android:id="@+id/settings_use_english"
|
android:id="@+id/settings_customize_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_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" />
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
</RelativeLayout>
|
||||||
android:id="@+id/text_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/text"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:textSize="@dimen/smaller_text_size" />
|
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/settings_show_word_count_holder"
|
android:id="@+id/settings_customize_widget_colors_holder"
|
||||||
android:layout_width="match_parent"
|
style="@style/SettingsHolderTextViewOneLinerStyle"
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="@dimen/medium_margin"
|
|
||||||
android:background="?attr/selectableItemBackground"
|
|
||||||
android:paddingStart="@dimen/normal_margin"
|
|
||||||
android:paddingTop="@dimen/activity_margin"
|
|
||||||
android:paddingEnd="@dimen/normal_margin"
|
|
||||||
android:paddingBottom="@dimen/activity_margin">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MySwitchCompat
|
|
||||||
android:id="@+id/settings_show_word_count"
|
|
||||||
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/show_word_count"
|
|
||||||
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_clickable_links_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:paddingStart="@dimen/normal_margin"
|
|
||||||
android:paddingTop="@dimen/activity_margin"
|
|
||||||
android:paddingEnd="@dimen/normal_margin"
|
|
||||||
android:paddingBottom="@dimen/activity_margin">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MySwitchCompat
|
<LinearLayout
|
||||||
android:id="@+id/settings_clickable_links"
|
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_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_top_corners">
|
||||||
android:clickable="false"
|
|
||||||
android:paddingStart="@dimen/medium_margin"
|
|
||||||
android:text="@string/links_and_emails_clickable"
|
|
||||||
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" />
|
||||||
|
|
||||||
<RelativeLayout
|
</RelativeLayout>
|
||||||
android:id="@+id/settings_monospaced_font_holder"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="@dimen/medium_margin"
|
|
||||||
android:background="?attr/selectableItemBackground"
|
|
||||||
android:paddingStart="@dimen/normal_margin"
|
|
||||||
android:paddingTop="@dimen/activity_margin"
|
|
||||||
android:paddingEnd="@dimen/normal_margin"
|
|
||||||
android:paddingBottom="@dimen/activity_margin">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MySwitchCompat
|
<RelativeLayout
|
||||||
android:id="@+id/settings_monospaced_font"
|
android:id="@+id/settings_font_size_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:background="@null"
|
android:background="@drawable/ripple_bottom_corners">
|
||||||
android:clickable="false"
|
|
||||||
android:paddingStart="@dimen/medium_margin"
|
|
||||||
android:text="@string/monospaced_font"
|
|
||||||
app:switchPadding="@dimen/medium_margin" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
|
android:id="@+id/settings_font_size_label"
|
||||||
|
style="@style/SettingsTextLabelStyle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/font_size" />
|
||||||
|
|
||||||
<RelativeLayout
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
android:id="@+id/settings_use_incognito_mode_holder"
|
android:id="@+id/settings_font_size"
|
||||||
|
style="@style/SettingsTextValueStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/settings_font_size_label"
|
||||||
|
tools:text="100%" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/settings_text_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/text" />
|
||||||
android:background="?attr/selectableItemBackground"
|
|
||||||
android:paddingStart="@dimen/normal_margin"
|
|
||||||
android:paddingTop="@dimen/activity_margin"
|
|
||||||
android:paddingEnd="@dimen/normal_margin"
|
|
||||||
android:paddingBottom="@dimen/activity_margin">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MySwitchCompat
|
<LinearLayout
|
||||||
android:id="@+id/settings_use_incognito_mode"
|
android:id="@+id/settings_text_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_word_count_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_top_corners">
|
||||||
android:clickable="false"
|
|
||||||
android:paddingStart="@dimen/medium_margin"
|
|
||||||
android:text="@string/use_incognito_mode"
|
|
||||||
app:switchPadding="@dimen/medium_margin" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||||
|
android:id="@+id/settings_show_word_count"
|
||||||
|
style="@style/SettingsCheckboxStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/show_word_count" />
|
||||||
|
|
||||||
<RelativeLayout
|
</RelativeLayout>
|
||||||
android:id="@+id/settings_enable_line_wrap_holder"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="@dimen/medium_margin"
|
|
||||||
android:background="?attr/selectableItemBackground"
|
|
||||||
android:paddingStart="@dimen/normal_margin"
|
|
||||||
android:paddingTop="@dimen/activity_margin"
|
|
||||||
android:paddingEnd="@dimen/normal_margin"
|
|
||||||
android:paddingBottom="@dimen/activity_margin">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MySwitchCompat
|
<RelativeLayout
|
||||||
android:id="@+id/settings_enable_line_wrap"
|
android:id="@+id/settings_clickable_links_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/enable_line_wrap"
|
|
||||||
app:switchPadding="@dimen/medium_margin" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||||
|
android:id="@+id/settings_clickable_links"
|
||||||
|
style="@style/SettingsCheckboxStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/links_and_emails_clickable" />
|
||||||
|
|
||||||
<RelativeLayout
|
</RelativeLayout>
|
||||||
android:id="@+id/settings_font_size_holder"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="@dimen/medium_margin"
|
|
||||||
android:background="?attr/selectableItemBackground"
|
|
||||||
android:paddingStart="@dimen/normal_margin"
|
|
||||||
android:paddingTop="@dimen/activity_margin"
|
|
||||||
android:paddingEnd="@dimen/normal_margin"
|
|
||||||
android:paddingBottom="@dimen/activity_margin">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
<RelativeLayout
|
||||||
android:id="@+id/settings_font_size_label"
|
android:id="@+id/settings_monospaced_font_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_font_size"
|
|
||||||
android:paddingStart="@dimen/medium_margin"
|
|
||||||
android:paddingEnd="@dimen/medium_margin"
|
|
||||||
android:text="@string/font_size" />
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||||
android:id="@+id/settings_font_size"
|
android:id="@+id/settings_monospaced_font"
|
||||||
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/medium_margin"
|
android:text="@string/monospaced_font" />
|
||||||
android:background="@null"
|
|
||||||
android:clickable="false" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/settings_gravity_holder"
|
android:id="@+id/settings_use_incognito_mode_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:paddingStart="@dimen/normal_margin"
|
|
||||||
android:paddingTop="@dimen/activity_margin"
|
|
||||||
android:paddingEnd="@dimen/normal_margin"
|
|
||||||
android:paddingBottom="@dimen/activity_margin">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
|
||||||
android:id="@+id/settings_gravity_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_gravity"
|
|
||||||
android:paddingStart="@dimen/medium_margin"
|
|
||||||
android:paddingEnd="@dimen/medium_margin"
|
|
||||||
android:text="@string/alignment" />
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||||
android:id="@+id/settings_gravity"
|
android:id="@+id/settings_use_incognito_mode"
|
||||||
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/medium_margin"
|
android:text="@string/use_incognito_mode" />
|
||||||
android:background="@null"
|
|
||||||
android:clickable="false" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/settings_add_checklist_top_holder"
|
android:id="@+id/settings_enable_line_wrap_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:paddingStart="@dimen/normal_margin"
|
|
||||||
android:paddingTop="@dimen/activity_margin"
|
|
||||||
android:paddingEnd="@dimen/normal_margin"
|
|
||||||
android:paddingBottom="@dimen/activity_margin">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MySwitchCompat
|
|
||||||
android:id="@+id/settings_add_checklist_top"
|
|
||||||
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/add_new_checklist_items_top"
|
|
||||||
app:switchPadding="@dimen/medium_margin" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||||
|
android:id="@+id/settings_enable_line_wrap"
|
||||||
|
style="@style/SettingsCheckboxStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/enable_line_wrap" />
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
</RelativeLayout>
|
||||||
android:id="@+id/startup_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/startup"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:textSize="@dimen/smaller_text_size" />
|
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/settings_cursor_placement_holder"
|
android:id="@+id/settings_gravity_holder"
|
||||||
android:layout_width="match_parent"
|
style="@style/SettingsHolderTextViewStyle"
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="@dimen/medium_margin"
|
|
||||||
android:background="?attr/selectableItemBackground"
|
|
||||||
android:paddingStart="@dimen/normal_margin"
|
|
||||||
android:paddingTop="@dimen/activity_margin"
|
|
||||||
android:paddingEnd="@dimen/normal_margin"
|
|
||||||
android:paddingBottom="@dimen/activity_margin">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MySwitchCompat
|
|
||||||
android:id="@+id/settings_cursor_placement"
|
|
||||||
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/place_cursor_end"
|
|
||||||
app:switchPadding="@dimen/medium_margin" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
|
android:id="@+id/settings_gravity_label"
|
||||||
|
style="@style/SettingsTextLabelStyle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/alignment" />
|
||||||
|
|
||||||
<RelativeLayout
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
android:id="@+id/settings_show_keyboard_holder"
|
android:id="@+id/settings_gravity"
|
||||||
|
style="@style/SettingsTextValueStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/settings_gravity_label"
|
||||||
|
tools:text="@string/left" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/settings_startup_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/startup" />
|
||||||
android:background="?attr/selectableItemBackground"
|
|
||||||
android:paddingStart="@dimen/normal_margin"
|
|
||||||
android:paddingTop="@dimen/activity_margin"
|
|
||||||
android:paddingEnd="@dimen/normal_margin"
|
|
||||||
android:paddingBottom="@dimen/activity_margin">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MySwitchCompat
|
<LinearLayout
|
||||||
android:id="@+id/settings_show_keyboard"
|
android:id="@+id/settings_startup_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_cursor_placement_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_top_corners">
|
||||||
android:clickable="false"
|
|
||||||
android:paddingStart="@dimen/medium_margin"
|
|
||||||
android:text="@string/show_keyboard"
|
|
||||||
app:switchPadding="@dimen/medium_margin" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||||
|
android:id="@+id/settings_cursor_placement"
|
||||||
|
style="@style/SettingsCheckboxStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/place_cursor_end" />
|
||||||
|
|
||||||
<RelativeLayout
|
</RelativeLayout>
|
||||||
android:id="@+id/settings_show_note_picker_holder"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="@dimen/medium_margin"
|
|
||||||
android:background="?attr/selectableItemBackground"
|
|
||||||
android:paddingStart="@dimen/normal_margin"
|
|
||||||
android:paddingTop="@dimen/activity_margin"
|
|
||||||
android:paddingEnd="@dimen/normal_margin"
|
|
||||||
android:paddingBottom="@dimen/activity_margin">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MySwitchCompat
|
<RelativeLayout
|
||||||
android:id="@+id/settings_show_note_picker"
|
android:id="@+id/settings_show_keyboard_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/show_note_picker"
|
|
||||||
app:switchPadding="@dimen/medium_margin" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||||
|
android:id="@+id/settings_show_keyboard"
|
||||||
|
style="@style/SettingsCheckboxStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/show_keyboard" />
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
</RelativeLayout>
|
||||||
android:id="@+id/saving_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/saving_label"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:textSize="@dimen/smaller_text_size" />
|
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/settings_autosave_notes_holder"
|
android:id="@+id/settings_show_note_picker_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:paddingStart="@dimen/normal_margin"
|
|
||||||
android:paddingTop="@dimen/activity_margin"
|
|
||||||
android:paddingEnd="@dimen/normal_margin"
|
|
||||||
android:paddingBottom="@dimen/activity_margin">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MySwitchCompat
|
|
||||||
android:id="@+id/settings_autosave_notes"
|
|
||||||
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/autosave_notes"
|
|
||||||
app:switchPadding="@dimen/medium_margin" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||||
|
android:id="@+id/settings_show_note_picker"
|
||||||
|
style="@style/SettingsCheckboxStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/show_note_picker" />
|
||||||
|
|
||||||
<RelativeLayout
|
</RelativeLayout>
|
||||||
android:id="@+id/settings_display_success_holder"
|
</LinearLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/settings_saving_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/saving_label" />
|
||||||
android:background="?attr/selectableItemBackground"
|
|
||||||
android:paddingStart="@dimen/normal_margin"
|
|
||||||
android:paddingTop="@dimen/activity_margin"
|
|
||||||
android:paddingEnd="@dimen/normal_margin"
|
|
||||||
android:paddingBottom="@dimen/activity_margin">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MySwitchCompat
|
<LinearLayout
|
||||||
android:id="@+id/settings_display_success"
|
android:id="@+id/settings_saving_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_autosave_notes_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_top_corners">
|
||||||
android:clickable="false"
|
|
||||||
android:paddingStart="@dimen/medium_margin"
|
|
||||||
android:text="@string/display_success_message"
|
|
||||||
app:switchPadding="@dimen/medium_margin" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||||
|
android:id="@+id/settings_autosave_notes"
|
||||||
|
style="@style/SettingsCheckboxStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/autosave_notes" />
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
</RelativeLayout>
|
||||||
android:id="@+id/widgets_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/widgets"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:textSize="@dimen/smaller_text_size" />
|
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/settings_customize_widget_colors_holder"
|
android:id="@+id/settings_display_success_holder"
|
||||||
android:layout_width="match_parent"
|
style="@style/SettingsHolderCheckboxStyle"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_marginTop="@dimen/medium_margin"
|
|
||||||
android:background="?attr/selectableItemBackground"
|
|
||||||
android:paddingStart="@dimen/normal_margin"
|
|
||||||
android:paddingTop="@dimen/activity_margin"
|
|
||||||
android:paddingEnd="@dimen/normal_margin"
|
|
||||||
android:paddingBottom="@dimen/activity_margin">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
|
||||||
android:id="@+id/settings_customize_widget_colors_label"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerVertical="true"
|
android:background="@drawable/ripple_bottom_corners">
|
||||||
android:paddingStart="@dimen/medium_margin"
|
|
||||||
android:text="@string/customize_widget_colors" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||||
|
android:id="@+id/settings_display_success"
|
||||||
|
style="@style/SettingsCheckboxStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/display_success_message" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user