diff --git a/app/src/main/kotlin/com/simplemobiletools/keyboard/activities/SettingsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/keyboard/activities/SettingsActivity.kt
index 3a19ffcc..18fe50aa 100644
--- a/app/src/main/kotlin/com/simplemobiletools/keyboard/activities/SettingsActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/keyboard/activities/SettingsActivity.kt
@@ -11,7 +11,9 @@ import com.simplemobiletools.keyboard.R
import com.simplemobiletools.keyboard.extensions.config
import com.simplemobiletools.keyboard.extensions.getKeyboardLanguageText
import com.simplemobiletools.keyboard.extensions.getKeyboardLanguages
-import com.simplemobiletools.keyboard.helpers.*
+import com.simplemobiletools.keyboard.helpers.KEYBOARD_HEIGHT_MULTIPLIER_LARGE
+import com.simplemobiletools.keyboard.helpers.KEYBOARD_HEIGHT_MULTIPLIER_MEDIUM
+import com.simplemobiletools.keyboard.helpers.KEYBOARD_HEIGHT_MULTIPLIER_SMALL
import kotlinx.android.synthetic.main.activity_settings.*
import java.util.*
import kotlin.system.exitProcess
@@ -19,8 +21,12 @@ import kotlin.system.exitProcess
class SettingsActivity : SimpleActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
+ isMaterialActivity = true
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_settings)
+
+ updateMaterialActivityViews(settings_coordinator, settings_holder)
+ setupMaterialScrollListener(settings_nested_scrollview, settings_toolbar)
}
override fun onResume() {
@@ -39,32 +45,21 @@ class SettingsActivity : SimpleActivity() {
updateTextColors(settings_nested_scrollview)
- arrayOf(settings_color_customization_label, settings_general_settings_label).forEach {
+ arrayOf(settings_color_customization_section_label, settings_general_settings_label).forEach {
it.setTextColor(getProperPrimaryColor())
}
-
- arrayOf(settings_color_customization_holder, settings_general_settings_holder).forEach {
- it.background.applyColorFilter(getProperBackgroundColor().getContrastColor())
- }
}
private fun setupPurchaseThankYou() {
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_language_holder.background = resources.getDrawable(R.drawable.ripple_top_corners, theme)
- }
-
settings_purchase_thank_you_holder.setOnClickListener {
launchPurchaseThankYouIntent()
}
}
private fun setupCustomizeColors() {
- settings_customize_colors_label.text = getCustomizeColorsString()
- settings_customize_colors_holder.setOnClickListener {
+ settings_color_customization_label.text = getCustomizeColorsString()
+ settings_color_customization_holder.setOnClickListener {
handleCustomizeColorsClick()
}
}
@@ -82,11 +77,6 @@ class SettingsActivity : SimpleActivity() {
private fun setupLanguage() {
settings_language.text = Locale.getDefault().displayLanguage
settings_language_holder.beVisibleIf(isTiramisuPlus())
-
- if (settings_use_english_holder.isGone() && settings_language_holder.isGone() && settings_purchase_thank_you_holder.isGone()) {
- settings_manage_clipboard_items_holder.background = resources.getDrawable(R.drawable.ripple_top_corners, theme)
- }
-
settings_language_holder.setOnClickListener {
launchChangeAppLanguageIntent()
}
diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml
index de3033a2..12ebb51b 100644
--- a/app/src/main/res/layout/activity_settings.xml
+++ b/app/src/main/res/layout/activity_settings.xml
@@ -6,28 +6,21 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
-
-
-
-
-
+ android:layout_height="?attr/actionBarSize"
+ android:background="@color/color_primary"
+ app:title="@string/settings"
+ app:titleTextAppearance="@style/AppTheme.ActionBar.TitleTextStyle" />
+ android:scrollbars="none">
-
+ android:layout_height="wrap_content">
-
+ android:text="@string/customize_colors"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent" />
-
+
-
-
+
-
+ android:layout_height="wrap_content">
-
+
+
+
+
+
+
+ android:text="@string/use_english_language" />
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ android:text="@string/vibrate_on_keypress" />
-
+
-
+
-
+ android:text="@string/show_popup" />
-
+
-
+
-
+
-
+ android:layout_below="@+id/settings_keyboard_language_label"
+ tools:text="@string/translation_english" />
-
+
-
+
-
+
+
+ android:layout_below="@+id/settings_keyboard_height_multiplier_label"
+ tools:text="@string/small" />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+