mirror of
https://github.com/SimpleMobileTools/Simple-Keyboard.git
synced 2025-06-05 21:49:26 +02:00
Added capitalization setting in SettingsActivity
This commit is contained in:
parent
000c907a02
commit
62e639afc3
@ -44,6 +44,7 @@ class SettingsActivity : SimpleActivity() {
|
|||||||
setupKeyboardLanguage()
|
setupKeyboardLanguage()
|
||||||
setupKeyboardHeightMultiplier()
|
setupKeyboardHeightMultiplier()
|
||||||
setupShowClipboardContent()
|
setupShowClipboardContent()
|
||||||
|
setupSentencesCapitalization()
|
||||||
setupShowNumbersRow()
|
setupShowNumbersRow()
|
||||||
|
|
||||||
updateTextColors(settings_nested_scrollview)
|
updateTextColors(settings_nested_scrollview)
|
||||||
@ -160,6 +161,15 @@ class SettingsActivity : SimpleActivity() {
|
|||||||
config.showClipboardContent = settings_show_clipboard_content.isChecked
|
config.showClipboardContent = settings_show_clipboard_content.isChecked
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun setupSentencesCapitalization() {
|
||||||
|
settings_enable_sentences_capitalization_row.isChecked = config.enableSentencesCapitalization
|
||||||
|
settings_enable_capitalization_row_holder.setOnClickListener {
|
||||||
|
settings_enable_sentences_capitalization_row.toggle()
|
||||||
|
config.enableSentencesCapitalization = settings_show_numbers_row.isChecked
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun setupShowNumbersRow() {
|
private fun setupShowNumbersRow() {
|
||||||
settings_show_numbers_row.isChecked = config.showNumbersRow
|
settings_show_numbers_row.isChecked = config.showNumbersRow
|
||||||
settings_show_numbers_row_holder.setOnClickListener {
|
settings_show_numbers_row_holder.setOnClickListener {
|
||||||
|
@ -17,6 +17,10 @@ class Config(context: Context) : BaseConfig(context) {
|
|||||||
get() = prefs.getBoolean(SHOW_POPUP_ON_KEYPRESS, true)
|
get() = prefs.getBoolean(SHOW_POPUP_ON_KEYPRESS, true)
|
||||||
set(showPopupOnKeypress) = prefs.edit().putBoolean(SHOW_POPUP_ON_KEYPRESS, showPopupOnKeypress).apply()
|
set(showPopupOnKeypress) = prefs.edit().putBoolean(SHOW_POPUP_ON_KEYPRESS, showPopupOnKeypress).apply()
|
||||||
|
|
||||||
|
var enableSentencesCapitalization: Boolean
|
||||||
|
get() = prefs.getBoolean(SENTENCES_CAPITALIZATION, false)
|
||||||
|
set(enableCapitalization) = prefs.edit().putBoolean(SENTENCES_CAPITALIZATION, enableCapitalization).apply()
|
||||||
|
|
||||||
var showKeyBorders: Boolean
|
var showKeyBorders: Boolean
|
||||||
get() = prefs.getBoolean(SHOW_KEY_BORDERS, false)
|
get() = prefs.getBoolean(SHOW_KEY_BORDERS, false)
|
||||||
set(showKeyBorders) = prefs.edit().putBoolean(SHOW_KEY_BORDERS, showKeyBorders).apply()
|
set(showKeyBorders) = prefs.edit().putBoolean(SHOW_KEY_BORDERS, showKeyBorders).apply()
|
||||||
|
@ -190,6 +190,7 @@
|
|||||||
android:text="@string/show_clipboard_content" />
|
android:text="@string/show_clipboard_content" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/settings_show_numbers_row_holder"
|
android:id="@+id/settings_show_numbers_row_holder"
|
||||||
style="@style/SettingsHolderCheckboxStyle"
|
style="@style/SettingsHolderCheckboxStyle"
|
||||||
@ -205,6 +206,21 @@
|
|||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/settings_enable_capitalization_row_holder"
|
||||||
|
style="@style/SettingsHolderCheckboxStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||||
|
android:id="@+id/settings_enable_sentences_capitalization_row"
|
||||||
|
style="@style/SettingsCheckboxStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/enable_sentences_capitalization" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/settings_keyboard_language_holder"
|
android:id="@+id/settings_keyboard_language_holder"
|
||||||
style="@style/SettingsHolderTextViewStyle"
|
style="@style/SettingsHolderTextViewStyle"
|
||||||
|
@ -34,7 +34,8 @@
|
|||||||
<string name="keyboard_height">Keyboard height</string>
|
<string name="keyboard_height">Keyboard height</string>
|
||||||
<string name="show_key_borders">Show key borders</string>
|
<string name="show_key_borders">Show key borders</string>
|
||||||
<string name="show_numbers_row">Show numbers on a separate row</string>
|
<string name="show_numbers_row">Show numbers on a separate row</string>
|
||||||
<!-- Emojis -->
|
<string name="enable_sentences_capitalization">Capisalise the first word of each sentence</string>
|
||||||
|
c <!-- Emojis -->
|
||||||
<string name="emojis">Emojis</string>
|
<string name="emojis">Emojis</string>
|
||||||
<!--
|
<!--
|
||||||
Haven't found some strings? There's more at
|
Haven't found some strings? There's more at
|
||||||
|
Loading…
x
Reference in New Issue
Block a user