feat: added setting to show number row
This commit is contained in:
parent
87b3de88c7
commit
a39442976a
|
@ -44,6 +44,7 @@ class SettingsActivity : SimpleActivity() {
|
|||
setupKeyboardLanguage()
|
||||
setupKeyboardHeightMultiplier()
|
||||
setupShowClipboardContent()
|
||||
setupShowNumbersRow()
|
||||
|
||||
updateTextColors(settings_nested_scrollview)
|
||||
|
||||
|
@ -159,4 +160,11 @@ class SettingsActivity : SimpleActivity() {
|
|||
config.showClipboardContent = settings_show_clipboard_content.isChecked
|
||||
}
|
||||
}
|
||||
private fun setupShowNumbersRow() {
|
||||
settings_show_numbers_row.isChecked = config.showNumbersRow
|
||||
settings_show_numbers_row_holder.setOnClickListener {
|
||||
settings_show_numbers_row.toggle()
|
||||
config.showNumbersRow = settings_show_numbers_row.isChecked
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,6 +37,9 @@ class Config(context: Context) : BaseConfig(context) {
|
|||
get() = prefs.getBoolean(SHOW_CLIPBOARD_CONTENT, true)
|
||||
set(showClipboardContent) = prefs.edit().putBoolean(SHOW_CLIPBOARD_CONTENT, showClipboardContent).apply()
|
||||
|
||||
var showNumbersRow: Boolean
|
||||
get() = prefs.getBoolean(SHOW_NUMBERS_ROW, false)
|
||||
set(showNumbersRow) = prefs.edit().putBoolean(SHOW_NUMBERS_ROW, showNumbersRow).apply()
|
||||
|
||||
private fun getDefaultLanguage(): Int {
|
||||
val conf = context.resources.configuration
|
||||
|
|
|
@ -15,6 +15,7 @@ const val LAST_EXPORTED_CLIPS_FOLDER = "last_exported_clips_folder"
|
|||
const val KEYBOARD_LANGUAGE = "keyboard_language"
|
||||
const val HEIGHT_MULTIPLIER = "height_multiplier"
|
||||
const val SHOW_CLIPBOARD_CONTENT = "show_clipboard_content"
|
||||
const val SHOW_NUMBERS_ROW = "show_numbers_row"
|
||||
|
||||
// differentiate current and pinned clips at the keyboards' Clipboard section
|
||||
const val ITEM_SECTION_LABEL = 0
|
||||
|
|
|
@ -189,6 +189,20 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:text="@string/show_clipboard_content" />
|
||||
|
||||
</RelativeLayout>
|
||||
<RelativeLayout
|
||||
android:id="@+id/settings_show_numbers_row_holder"
|
||||
style="@style/SettingsHolderCheckboxStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||
android:id="@+id/settings_show_numbers_row"
|
||||
style="@style/SettingsCheckboxStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/show_numbers_row" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
|
|
Loading…
Reference in New Issue