mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-17 15:26:23 +00:00
[fenix] For https://github.com/mozilla-mobile/fenix/issues/16395 - Use Secondary Text for the Site Permissions subtext
This commit is contained in:
parent
918da19eec
commit
00ca6eb509
@ -5,7 +5,6 @@
|
|||||||
package org.mozilla.fenix.settings.sitepermissions
|
package org.mozilla.fenix.settings.sitepermissions
|
||||||
|
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.graphics.Color
|
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.provider.Settings.ACTION_APPLICATION_DETAILS_SETTINGS
|
import android.provider.Settings.ACTION_APPLICATION_DETAILS_SETTINGS
|
||||||
@ -19,6 +18,7 @@ import android.view.View
|
|||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import android.widget.Button
|
import android.widget.Button
|
||||||
import android.widget.RadioButton
|
import android.widget.RadioButton
|
||||||
|
import androidx.core.content.ContextCompat
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.navigation.fragment.navArgs
|
import androidx.navigation.fragment.navArgs
|
||||||
import mozilla.components.feature.sitepermissions.SitePermissionsRules
|
import mozilla.components.feature.sitepermissions.SitePermissionsRules
|
||||||
@ -35,6 +35,7 @@ import org.mozilla.fenix.settings.PhoneFeature
|
|||||||
import org.mozilla.fenix.settings.PhoneFeature.AUTOPLAY_AUDIBLE
|
import org.mozilla.fenix.settings.PhoneFeature.AUTOPLAY_AUDIBLE
|
||||||
import org.mozilla.fenix.settings.PhoneFeature.AUTOPLAY_INAUDIBLE
|
import org.mozilla.fenix.settings.PhoneFeature.AUTOPLAY_INAUDIBLE
|
||||||
import org.mozilla.fenix.settings.setStartCheckedIndicator
|
import org.mozilla.fenix.settings.setStartCheckedIndicator
|
||||||
|
import org.mozilla.fenix.theme.ThemeManager
|
||||||
import org.mozilla.fenix.utils.Settings
|
import org.mozilla.fenix.utils.Settings
|
||||||
|
|
||||||
const val AUTOPLAY_BLOCK_ALL = 0
|
const val AUTOPLAY_BLOCK_ALL = 0
|
||||||
@ -243,9 +244,13 @@ class SitePermissionsManagePhoneFeatureFragment : Fragment() {
|
|||||||
val subTextSize =
|
val subTextSize =
|
||||||
resources.getDimensionPixelSize(R.dimen.phone_feature_label_recommended_text_size)
|
resources.getDimensionPixelSize(R.dimen.phone_feature_label_recommended_text_size)
|
||||||
val recommendedSpannable = SpannableString(subText)
|
val recommendedSpannable = SpannableString(subText)
|
||||||
|
val subTextColor = ContextCompat.getColor(
|
||||||
|
requireContext(),
|
||||||
|
ThemeManager.resolveAttribute(R.attr.secondaryText, requireContext())
|
||||||
|
)
|
||||||
|
|
||||||
recommendedSpannable.setSpan(
|
recommendedSpannable.setSpan(
|
||||||
ForegroundColorSpan(Color.GRAY),
|
ForegroundColorSpan(subTextColor),
|
||||||
0,
|
0,
|
||||||
recommendedSpannable.length,
|
recommendedSpannable.length,
|
||||||
SPAN_EXCLUSIVE_INCLUSIVE
|
SPAN_EXCLUSIVE_INCLUSIVE
|
||||||
|
Loading…
Reference in New Issue
Block a user