mirror of
https://github.com/SimpleMobileTools/Simple-Keyboard.git
synced 2025-06-05 21:49:26 +02:00
feat: added setting to show number row
This commit is contained in:
@ -44,6 +44,7 @@ class SettingsActivity : SimpleActivity() {
|
|||||||
setupKeyboardLanguage()
|
setupKeyboardLanguage()
|
||||||
setupKeyboardHeightMultiplier()
|
setupKeyboardHeightMultiplier()
|
||||||
setupShowClipboardContent()
|
setupShowClipboardContent()
|
||||||
|
setupShowNumbersRow()
|
||||||
|
|
||||||
updateTextColors(settings_nested_scrollview)
|
updateTextColors(settings_nested_scrollview)
|
||||||
|
|
||||||
@ -159,4 +160,11 @@ class SettingsActivity : SimpleActivity() {
|
|||||||
config.showClipboardContent = settings_show_clipboard_content.isChecked
|
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)
|
get() = prefs.getBoolean(SHOW_CLIPBOARD_CONTENT, true)
|
||||||
set(showClipboardContent) = prefs.edit().putBoolean(SHOW_CLIPBOARD_CONTENT, showClipboardContent).apply()
|
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 {
|
private fun getDefaultLanguage(): Int {
|
||||||
val conf = context.resources.configuration
|
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 KEYBOARD_LANGUAGE = "keyboard_language"
|
||||||
const val HEIGHT_MULTIPLIER = "height_multiplier"
|
const val HEIGHT_MULTIPLIER = "height_multiplier"
|
||||||
const val SHOW_CLIPBOARD_CONTENT = "show_clipboard_content"
|
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
|
// differentiate current and pinned clips at the keyboards' Clipboard section
|
||||||
const val ITEM_SECTION_LABEL = 0
|
const val ITEM_SECTION_LABEL = 0
|
||||||
|
@ -189,6 +189,20 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/show_clipboard_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>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
Reference in New Issue
Block a user