fixing a couple more coloring things here and there

This commit is contained in:
tibbi 2021-11-07 18:49:49 +01:00
parent 75b9877d72
commit 2eeae20c27
4 changed files with 18 additions and 10 deletions

View file

@ -24,12 +24,20 @@ class ContributorsActivity : BaseSimpleActivity() {
contributors_development_label.setTextColor(getAdjustedPrimaryColor()) contributors_development_label.setTextColor(getAdjustedPrimaryColor())
contributors_translation_label.setTextColor(getAdjustedPrimaryColor()) contributors_translation_label.setTextColor(getAdjustedPrimaryColor())
contributors_label.text = Html.fromHtml(getString(R.string.contributors_label)) contributors_label.apply {
contributors_label.movementMethod = LinkMovementMethod.getInstance() setTextColor(baseConfig.textColor)
contributors_label.removeUnderlines() text = Html.fromHtml(getString(R.string.contributors_label))
setLinkTextColor(getAdjustedPrimaryColor())
movementMethod = LinkMovementMethod.getInstance()
removeUnderlines()
}
contributors_development_icon.applyColorFilter(baseConfig.textColor) contributors_development_icon.applyColorFilter(baseConfig.textColor)
contributors_footer_icon.applyColorFilter(baseConfig.textColor) contributors_footer_icon.applyColorFilter(baseConfig.textColor)
arrayOf(contributors_development_holder, contributors_translation_holder).forEach {
it.background.applyColorFilter(baseConfig.backgroundColor.getContrastColor())
}
} }
override fun onCreateOptionsMenu(menu: Menu): Boolean { override fun onCreateOptionsMenu(menu: Menu): Boolean {

View file

@ -7,9 +7,7 @@ import android.view.LayoutInflater
import android.view.Menu import android.view.Menu
import android.widget.LinearLayout import android.widget.LinearLayout
import com.simplemobiletools.commons.R import com.simplemobiletools.commons.R
import com.simplemobiletools.commons.extensions.baseConfig import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.commons.extensions.getAdjustedPrimaryColor
import com.simplemobiletools.commons.extensions.removeUnderlines
import com.simplemobiletools.commons.helpers.APP_FAQ import com.simplemobiletools.commons.helpers.APP_FAQ
import com.simplemobiletools.commons.helpers.APP_ICON_IDS import com.simplemobiletools.commons.helpers.APP_ICON_IDS
import com.simplemobiletools.commons.helpers.APP_LAUNCHER_NAME import com.simplemobiletools.commons.helpers.APP_LAUNCHER_NAME
@ -36,6 +34,7 @@ class FAQActivity : BaseSimpleActivity() {
faqItems.forEach { faqItems.forEach {
val faqItem = it val faqItem = it
inflater.inflate(R.layout.item_faq, null).apply { inflater.inflate(R.layout.item_faq, null).apply {
background.applyColorFilter(baseConfig.backgroundColor.getContrastColor())
faq_title.apply { faq_title.apply {
text = if (faqItem.title is Int) getString(faqItem.title) else faqItem.title as String text = if (faqItem.title is Int) getString(faqItem.title) else faqItem.title as String
setTextColor(titleColor) setTextColor(titleColor)
@ -44,6 +43,7 @@ class FAQActivity : BaseSimpleActivity() {
faq_text.apply { faq_text.apply {
text = if (faqItem.text is Int) Html.fromHtml(getString(faqItem.text)) else faqItem.text as String text = if (faqItem.text is Int) Html.fromHtml(getString(faqItem.text)) else faqItem.text as String
setTextColor(textColor) setTextColor(textColor)
setLinkTextColor(getAdjustedPrimaryColor())
movementMethod = LinkMovementMethod.getInstance() movementMethod = LinkMovementMethod.getInstance()
removeUnderlines() removeUnderlines()

View file

@ -5,10 +5,7 @@ import android.view.LayoutInflater
import android.view.Menu import android.view.Menu
import android.widget.LinearLayout import android.widget.LinearLayout
import com.simplemobiletools.commons.R import com.simplemobiletools.commons.R
import com.simplemobiletools.commons.extensions.baseConfig import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.commons.extensions.getAdjustedPrimaryColor
import com.simplemobiletools.commons.extensions.launchViewIntent
import com.simplemobiletools.commons.extensions.updateTextColors
import com.simplemobiletools.commons.helpers.* import com.simplemobiletools.commons.helpers.*
import com.simplemobiletools.commons.models.License import com.simplemobiletools.commons.models.License
import kotlinx.android.synthetic.main.activity_license.* import kotlinx.android.synthetic.main.activity_license.*
@ -35,6 +32,7 @@ class LicenseActivity : BaseSimpleActivity() {
licenses.filter { licenseMask and it.id != 0 }.forEach { licenses.filter { licenseMask and it.id != 0 }.forEach {
val license = it val license = it
inflater.inflate(R.layout.item_license, null).apply { inflater.inflate(R.layout.item_license, null).apply {
background.applyColorFilter(baseConfig.backgroundColor.getContrastColor())
license_title.apply { license_title.apply {
text = getString(license.titleId) text = getString(license.titleId)
setTextColor(titleColor) setTextColor(titleColor)

View file

@ -7,6 +7,7 @@ import androidx.appcompat.app.AlertDialog
import com.simplemobiletools.commons.R import com.simplemobiletools.commons.R
import com.simplemobiletools.commons.extensions.baseConfig import com.simplemobiletools.commons.extensions.baseConfig
import com.simplemobiletools.commons.extensions.launchPurchaseThankYouIntent import com.simplemobiletools.commons.extensions.launchPurchaseThankYouIntent
import com.simplemobiletools.commons.extensions.removeUnderlines
import com.simplemobiletools.commons.extensions.setupDialogStuff import com.simplemobiletools.commons.extensions.setupDialogStuff
import kotlinx.android.synthetic.main.dialog_purchase_thank_you.view.* import kotlinx.android.synthetic.main.dialog_purchase_thank_you.view.*
@ -20,6 +21,7 @@ class PurchaseThankYouDialog(val activity: Activity) {
purchase_thank_you.text = Html.fromHtml(text) purchase_thank_you.text = Html.fromHtml(text)
purchase_thank_you.movementMethod = LinkMovementMethod.getInstance() purchase_thank_you.movementMethod = LinkMovementMethod.getInstance()
purchase_thank_you.removeUnderlines()
} }
AlertDialog.Builder(activity) AlertDialog.Builder(activity)