diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 208c6d1..a1fb7b2 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -67,6 +67,7 @@ @@ -79,12 +80,14 @@ diff --git a/app/src/main/kotlin/com/simplemobiletools/draw/pro/activities/SettingsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/draw/pro/activities/SettingsActivity.kt index 99fbdfc..de67181 100644 --- a/app/src/main/kotlin/com/simplemobiletools/draw/pro/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/draw/pro/activities/SettingsActivity.kt @@ -1,7 +1,10 @@ package com.simplemobiletools.draw.pro.activities import android.os.Bundle -import com.simplemobiletools.commons.extensions.* +import com.simplemobiletools.commons.extensions.beVisibleIf +import com.simplemobiletools.commons.extensions.getProperPrimaryColor +import com.simplemobiletools.commons.extensions.isGone +import com.simplemobiletools.commons.extensions.updateTextColors import com.simplemobiletools.commons.helpers.NavigationIcon import com.simplemobiletools.commons.helpers.isTiramisuPlus import com.simplemobiletools.draw.pro.R @@ -11,8 +14,12 @@ import java.util.* 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() { @@ -31,14 +38,10 @@ class SettingsActivity : SimpleActivity() { arrayOf(settings_color_customization_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 setupCustomizeColors() { - settings_customize_colors_holder.setOnClickListener { + settings_color_customization_holder.setOnClickListener { startCustomizationActivity() } } @@ -57,10 +60,6 @@ class SettingsActivity : SimpleActivity() { settings_language.text = Locale.getDefault().displayLanguage settings_language_holder.beVisibleIf(isTiramisuPlus()) - if (settings_use_english_holder.isGone() && settings_language_holder.isGone()) { - settings_prevent_phone_from_sleeping_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 795e50f..87f3482 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -6,29 +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:layout_height="wrap_content"> + android:layout_height="wrap_content"> + android:layout_height="wrap_content"> + android:layout_height="wrap_content"> + android:layout_height="wrap_content">