updating the Settings style
This commit is contained in:
parent
8db8d3fb42
commit
efc95ef9f6
4 changed files with 268 additions and 258 deletions
|
|
@ -16,8 +16,8 @@ import com.simplemobiletools.smsmessenger.extensions.config
|
|||
import com.simplemobiletools.smsmessenger.extensions.getLockScreenVisibilityText
|
||||
import com.simplemobiletools.smsmessenger.extensions.getMMSFileLimitText
|
||||
import com.simplemobiletools.smsmessenger.helpers.*
|
||||
import java.util.*
|
||||
import kotlinx.android.synthetic.main.activity_settings.*
|
||||
import java.util.*
|
||||
|
||||
class SettingsActivity : SimpleActivity() {
|
||||
private var blockedNumbersAtPause = -1
|
||||
|
|
@ -47,6 +47,19 @@ class SettingsActivity : SimpleActivity() {
|
|||
if (blockedNumbersAtPause != -1 && blockedNumbersAtPause != getBlockedNumbers().hashCode()) {
|
||||
refreshMessages()
|
||||
}
|
||||
|
||||
arrayOf(settings_color_customization_label, settings_general_settings_label, settings_outgoing_messages_label, settings_notifications_label).forEach {
|
||||
it.setTextColor(getAdjustedPrimaryColor())
|
||||
}
|
||||
|
||||
arrayOf(
|
||||
settings_color_customization_holder,
|
||||
settings_general_settings_holder,
|
||||
settings_outgoing_messages_holder,
|
||||
settings_notifications_holder
|
||||
).forEach {
|
||||
it.background.applyColorFilter(baseConfig.backgroundColor.getContrastColor())
|
||||
}
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
|
|
@ -61,6 +74,12 @@ class SettingsActivity : SimpleActivity() {
|
|||
|
||||
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_purchase_thank_you_holder.setOnClickListener {
|
||||
launchPurchaseThankYouIntent()
|
||||
}
|
||||
|
|
@ -83,6 +102,11 @@ class SettingsActivity : SimpleActivity() {
|
|||
private fun setupUseEnglish() {
|
||||
settings_use_english_holder.beVisibleIf(config.wasUseEnglishToggled || Locale.getDefault().language != "en")
|
||||
settings_use_english.isChecked = config.useEnglish
|
||||
|
||||
if (settings_use_english_holder.isGone() && settings_purchase_thank_you_holder.isGone()) {
|
||||
settings_change_date_time_format_holder.background = resources.getDrawable(R.drawable.ripple_top_corners, theme)
|
||||
}
|
||||
|
||||
settings_use_english_holder.setOnClickListener {
|
||||
settings_use_english.toggle()
|
||||
config.useEnglish = settings_use_english.isChecked
|
||||
|
|
@ -131,6 +155,7 @@ class SettingsActivity : SimpleActivity() {
|
|||
config.showCharacterCounter = settings_show_character_counter.isChecked
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupUseSimpleCharacters() {
|
||||
settings_use_simple_characters.isChecked = config.useSimpleCharacters
|
||||
settings_use_simple_characters_holder.setOnClickListener {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue