forked from upstream-mirrors/quik
Disable PreferenceViews instead of hiding them
This commit is contained in:
@@ -119,13 +119,12 @@ class TextViewStyler @Inject constructor(
|
||||
else -> return
|
||||
}
|
||||
|
||||
setTextColor(when (colorAttr) {
|
||||
COLOR_THEME -> colors.theme().theme
|
||||
COLOR_PRIMARY_ON_THEME -> colors.theme().textPrimary
|
||||
COLOR_SECONDARY_ON_THEME -> colors.theme().textSecondary
|
||||
COLOR_TERTIARY_ON_THEME -> colors.theme().textTertiary
|
||||
else -> currentTextColor
|
||||
})
|
||||
when (colorAttr) {
|
||||
COLOR_THEME -> setTextColor(colors.theme().theme)
|
||||
COLOR_PRIMARY_ON_THEME -> setTextColor(colors.theme().textPrimary)
|
||||
COLOR_SECONDARY_ON_THEME -> setTextColor(colors.theme().textSecondary)
|
||||
COLOR_TERTIARY_ON_THEME -> setTextColor(colors.theme().textTertiary)
|
||||
}
|
||||
|
||||
setTextSize(textView, textSizeAttr)
|
||||
}
|
||||
|
||||
@@ -26,8 +26,6 @@ import android.widget.TextView
|
||||
import androidx.appcompat.widget.LinearLayoutCompat
|
||||
import com.moez.QKSMS.R
|
||||
import com.moez.QKSMS.common.util.extensions.resolveThemeAttribute
|
||||
import com.moez.QKSMS.common.util.extensions.resolveThemeColor
|
||||
import com.moez.QKSMS.common.util.extensions.setTint
|
||||
import com.moez.QKSMS.common.util.extensions.setVisible
|
||||
import com.moez.QKSMS.injection.appComponent
|
||||
import kotlinx.android.synthetic.main.preference_view.view.*
|
||||
@@ -73,9 +71,6 @@ class PreferenceView @JvmOverloads constructor(
|
||||
orientation = HORIZONTAL
|
||||
gravity = Gravity.CENTER_VERTICAL
|
||||
|
||||
val textSecondary = context.resolveThemeColor(android.R.attr.textColorSecondary)
|
||||
icon.setTint(textSecondary)
|
||||
|
||||
context.obtainStyledAttributes(attrs, R.styleable.PreferenceView)?.run {
|
||||
title = getString(R.styleable.PreferenceView_title)
|
||||
summary = getString(R.styleable.PreferenceView_summary)
|
||||
|
||||
Reference in New Issue
Block a user