parent
2467588c4a
commit
d1651ecf71
|
@ -8,10 +8,10 @@ import android.content.Context
|
|||
import android.view.View
|
||||
import android.widget.RadioButton
|
||||
import android.widget.TextView
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.text.HtmlCompat
|
||||
import mozilla.components.feature.sitepermissions.SitePermissions
|
||||
import mozilla.components.feature.sitepermissions.SitePermissionsRules
|
||||
import mozilla.components.support.ktx.android.view.putCompoundDrawablesRelative
|
||||
import org.mozilla.fenix.R
|
||||
import org.mozilla.fenix.ThemeManager
|
||||
|
||||
|
@ -104,11 +104,11 @@ fun PhoneFeature.getPreferenceKey(context: Context): String {
|
|||
*/
|
||||
fun RadioButton.setStartCheckedIndicator() {
|
||||
val attr = ThemeManager.resolveAttribute(android.R.attr.listChoiceIndicatorSingle, context)
|
||||
val buttonDrawable = ContextCompat.getDrawable(context, attr)
|
||||
val buttonDrawable = context.getDrawable(attr)
|
||||
buttonDrawable?.apply {
|
||||
setBounds(0, 0, this.intrinsicWidth, this.intrinsicHeight)
|
||||
setBounds(0, 0, intrinsicWidth, intrinsicHeight)
|
||||
}
|
||||
setCompoundDrawablesRelative(buttonDrawable, null, null, null)
|
||||
putCompoundDrawablesRelative(start = buttonDrawable)
|
||||
}
|
||||
|
||||
fun initBlockedByAndroidView(phoneFeature: PhoneFeature, blockedByAndroidView: View) {
|
||||
|
|
|
@ -24,13 +24,11 @@ enum class PhoneFeature(val id: Int, val androidPermissionsList: Array<String>)
|
|||
MICROPHONE(ID_MICROPHONE_PERMISSION, arrayOf(RECORD_AUDIO)),
|
||||
NOTIFICATION(ID_NOTIFICATION_PERMISSION, emptyArray());
|
||||
|
||||
@Suppress("SpreadOperator")
|
||||
fun isAndroidPermissionGranted(context: Context): Boolean {
|
||||
val permissions = when (this) {
|
||||
CAMERA, LOCATION, MICROPHONE -> androidPermissionsList
|
||||
NOTIFICATION -> return true
|
||||
return when (this) {
|
||||
CAMERA, LOCATION, MICROPHONE -> context.isPermissionGranted(androidPermissionsList.asIterable())
|
||||
NOTIFICATION -> true
|
||||
}
|
||||
return context.isPermissionGranted(*permissions)
|
||||
}
|
||||
|
||||
fun getActionLabel(context: Context, sitePermissions: SitePermissions? = null, settings: Settings? = null): String {
|
||||
|
|
|
@ -4,15 +4,16 @@
|
|||
|
||||
package org.mozilla.fenix.settings.quicksettings
|
||||
|
||||
import android.graphics.drawable.Drawable
|
||||
import android.view.View
|
||||
import android.view.View.GONE
|
||||
import android.view.View.VISIBLE
|
||||
import android.view.ViewGroup
|
||||
import android.widget.TextView
|
||||
import androidx.appcompat.content.res.AppCompatResources
|
||||
import androidx.annotation.ColorRes
|
||||
import androidx.annotation.DrawableRes
|
||||
import androidx.annotation.IdRes
|
||||
import androidx.annotation.StringRes
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.net.toUri
|
||||
import androidx.core.view.isVisible
|
||||
import io.reactivex.Observable
|
||||
import io.reactivex.Observer
|
||||
import io.reactivex.functions.Consumer
|
||||
|
@ -21,6 +22,7 @@ import mozilla.components.feature.sitepermissions.SitePermissions
|
|||
import mozilla.components.feature.sitepermissions.SitePermissions.Status.BLOCKED
|
||||
import mozilla.components.feature.sitepermissions.SitePermissions.Status.NO_DECISION
|
||||
import mozilla.components.support.ktx.android.net.hostWithoutCommonPrefixes
|
||||
import mozilla.components.support.ktx.android.view.putCompoundDrawablesRelativeWithIntrinsicBounds
|
||||
import org.mozilla.fenix.R
|
||||
import org.mozilla.fenix.mvi.UIView
|
||||
import org.mozilla.fenix.settings.PhoneFeature
|
||||
|
@ -30,6 +32,8 @@ import org.mozilla.fenix.settings.PhoneFeature.MICROPHONE
|
|||
import org.mozilla.fenix.settings.PhoneFeature.NOTIFICATION
|
||||
import org.mozilla.fenix.utils.Settings
|
||||
|
||||
typealias LabelActionPair = Pair<TextView, TextView>
|
||||
|
||||
@Suppress("TooManyFunctions")
|
||||
class QuickSettingsUIView(
|
||||
container: ViewGroup,
|
||||
|
@ -40,8 +44,28 @@ class QuickSettingsUIView(
|
|||
container, actionEmitter, changesObservable
|
||||
) {
|
||||
private val blockedByAndroidPhoneFeatures = mutableListOf<PhoneFeature>()
|
||||
private val context get() = view.context
|
||||
private inline val context get() = view.context
|
||||
private val settings: Settings = Settings.getInstance(context)
|
||||
private val trackingProtectionSettingView = TrackingProtectionSettingView(view, actionEmitter)
|
||||
private val labelAndActions = mapOf(
|
||||
CAMERA to findLabelActionPair(R.id.camera_icon, R.id.camera_action_label),
|
||||
LOCATION to findLabelActionPair(R.id.location_icon, R.id.location_action_label),
|
||||
MICROPHONE to findLabelActionPair(R.id.microphone_icon, R.id.microphone_action_label),
|
||||
NOTIFICATION to findLabelActionPair(R.id.notification_icon, R.id.notification_action_label)
|
||||
)
|
||||
|
||||
private val blockedByAndroidClickListener = View.OnClickListener {
|
||||
val feature = it.tag as PhoneFeature
|
||||
actionEmitter.onNext(
|
||||
QuickSettingsAction.SelectBlockedByAndroid(feature.androidPermissionsList)
|
||||
)
|
||||
}
|
||||
private val togglePermissionClickListener = View.OnClickListener {
|
||||
val feature = it.tag as PhoneFeature
|
||||
actionEmitter.onNext(
|
||||
QuickSettingsAction.TogglePermission(feature)
|
||||
)
|
||||
}
|
||||
|
||||
override fun updateView() = Consumer<QuickSettingsState> { state ->
|
||||
when (state.mode) {
|
||||
|
@ -49,8 +73,7 @@ class QuickSettingsUIView(
|
|||
bindUrl(state.mode.url)
|
||||
bindSecurityInfo(state.mode.isSecured)
|
||||
bindReportSiteIssueAction(state.mode.url)
|
||||
bindTrackingProtectionAction()
|
||||
bindTrackingProtectionInfo(state.mode.isTrackingProtectionOn)
|
||||
trackingProtectionSettingView.bind(state.mode.isTrackingProtectionOn)
|
||||
bindPhoneFeatureItem(CAMERA, state.mode.sitePermissions)
|
||||
bindPhoneFeatureItem(MICROPHONE, state.mode.sitePermissions)
|
||||
bindPhoneFeatureItem(NOTIFICATION, state.mode.sitePermissions)
|
||||
|
@ -69,35 +92,6 @@ class QuickSettingsUIView(
|
|||
this.url.text = url.toUri().hostWithoutCommonPrefixes
|
||||
}
|
||||
|
||||
private fun bindTrackingProtectionInfo(isTrackingProtectionOn: Boolean) {
|
||||
val globalTPSetting = Settings.getInstance(context).shouldUseTrackingProtection
|
||||
val drawableId =
|
||||
if (isTrackingProtectionOn) R.drawable.ic_tracking_protection else
|
||||
R.drawable.ic_tracking_protection_disabled
|
||||
val icon = AppCompatResources.getDrawable(context, drawableId)
|
||||
tracking_protection.setCompoundDrawablesWithIntrinsicBounds(icon, null, null, null)
|
||||
tracking_protection.isChecked = isTrackingProtectionOn
|
||||
tracking_protection.isEnabled = globalTPSetting
|
||||
|
||||
tracking_protection.setOnCheckedChangeListener { _, isChecked ->
|
||||
actionEmitter.onNext(
|
||||
QuickSettingsAction.ToggleTrackingProtection(
|
||||
isChecked
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
private fun bindTrackingProtectionAction() {
|
||||
val globalTPSetting = Settings.getInstance(context).shouldUseTrackingProtection
|
||||
tracking_protection_action.visibility = if (globalTPSetting) View.GONE else View.VISIBLE
|
||||
tracking_protection_action.setOnClickListener {
|
||||
actionEmitter.onNext(
|
||||
QuickSettingsAction.SelectTrackingProtectionSettings
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
private fun bindReportSiteIssueAction(url: String) {
|
||||
report_site_issue_action.setOnClickListener {
|
||||
actionEmitter.onNext(
|
||||
|
@ -107,9 +101,9 @@ class QuickSettingsUIView(
|
|||
}
|
||||
|
||||
private fun bindSecurityInfo(isSecured: Boolean) {
|
||||
val stringId: Int
|
||||
val drawableId: Int
|
||||
val drawableTint: Int
|
||||
@StringRes val stringId: Int
|
||||
@DrawableRes val drawableId: Int
|
||||
@ColorRes val drawableTint: Int
|
||||
|
||||
if (isSecured) {
|
||||
stringId = R.string.quick_settings_sheet_secure_connection
|
||||
|
@ -121,39 +115,29 @@ class QuickSettingsUIView(
|
|||
drawableTint = R.color.photonRed50
|
||||
}
|
||||
|
||||
val icon = AppCompatResources.getDrawable(context, drawableId)
|
||||
val icon = context.getDrawable(drawableId)
|
||||
icon?.setTint(ContextCompat.getColor(context, drawableTint))
|
||||
security_info.setText(stringId)
|
||||
security_info.setCompoundDrawablesWithIntrinsicBounds(icon, null, null, null)
|
||||
security_info.putCompoundDrawablesRelativeWithIntrinsicBounds(start = icon)
|
||||
}
|
||||
|
||||
private fun bindPhoneFeatureItem(phoneFeature: PhoneFeature, sitePermissions: SitePermissions? = null) {
|
||||
if (phoneFeature.shouldBeHidden(sitePermissions)) {
|
||||
hide(phoneFeature)
|
||||
return
|
||||
}
|
||||
show(phoneFeature)
|
||||
if (!phoneFeature.isAndroidPermissionGranted(context)) {
|
||||
handleBlockedByAndroidAction(phoneFeature)
|
||||
} else {
|
||||
bindPhoneAction(phoneFeature, sitePermissions)
|
||||
val (label, action) = labelAndActions.getValue(phoneFeature)
|
||||
val shouldBeVisible = phoneFeature.shouldBeVisible(sitePermissions)
|
||||
label.isVisible = shouldBeVisible
|
||||
action.isVisible = shouldBeVisible
|
||||
|
||||
if (shouldBeVisible) {
|
||||
if (phoneFeature.isAndroidPermissionGranted(context)) {
|
||||
bindPhoneAction(phoneFeature, sitePermissions)
|
||||
} else {
|
||||
handleBlockedByAndroidAction(phoneFeature)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun show(phoneFeature: PhoneFeature) {
|
||||
val (label, action) = phoneFeature.labelAndAction
|
||||
label.visibility = VISIBLE
|
||||
action.visibility = VISIBLE
|
||||
}
|
||||
|
||||
private fun hide(phoneFeature: PhoneFeature) {
|
||||
val (label, action) = phoneFeature.labelAndAction
|
||||
label.visibility = GONE
|
||||
action.visibility = GONE
|
||||
}
|
||||
|
||||
private fun PhoneFeature.shouldBeHidden(sitePermissions: SitePermissions?): Boolean {
|
||||
return getStatus(sitePermissions, settings) == NO_DECISION
|
||||
private fun PhoneFeature.shouldBeVisible(sitePermissions: SitePermissions?): Boolean {
|
||||
return getStatus(sitePermissions, settings) != NO_DECISION
|
||||
}
|
||||
|
||||
private fun PhoneFeature.isPermissionBlocked(sitePermissions: SitePermissions?): Boolean {
|
||||
|
@ -161,25 +145,17 @@ class QuickSettingsUIView(
|
|||
}
|
||||
|
||||
private fun handleBlockedByAndroidAction(phoneFeature: PhoneFeature) {
|
||||
val (label, action) = phoneFeature.labelAndAction
|
||||
val (label, action) = labelAndActions.getValue(phoneFeature)
|
||||
|
||||
action.setText(R.string.phone_feature_blocked_by_android)
|
||||
action.tag = phoneFeature
|
||||
action.setOnClickListener {
|
||||
val feature = it.tag as PhoneFeature
|
||||
actionEmitter.onNext(
|
||||
QuickSettingsAction.SelectBlockedByAndroid(
|
||||
feature.androidPermissionsList
|
||||
)
|
||||
)
|
||||
}
|
||||
label.setCompoundDrawablesWithIntrinsicBounds(phoneFeature.disabledIcon, null, null, null)
|
||||
action.setOnClickListener(blockedByAndroidClickListener)
|
||||
label.isEnabled = false
|
||||
blockedByAndroidPhoneFeatures.add(phoneFeature)
|
||||
}
|
||||
|
||||
private fun bindPhoneAction(phoneFeature: PhoneFeature, sitePermissions: SitePermissions? = null) {
|
||||
val (label, action) = phoneFeature.labelAndAction
|
||||
val (label, action) = labelAndActions.getValue(phoneFeature)
|
||||
|
||||
action.text = phoneFeature.getActionLabel(
|
||||
context = context,
|
||||
|
@ -188,63 +164,21 @@ class QuickSettingsUIView(
|
|||
)
|
||||
|
||||
action.tag = phoneFeature
|
||||
action.setOnClickListener {
|
||||
val feature = it.tag as PhoneFeature
|
||||
actionEmitter.onNext(
|
||||
QuickSettingsAction.TogglePermission(feature)
|
||||
)
|
||||
}
|
||||
action.setOnClickListener(togglePermissionClickListener)
|
||||
|
||||
val icon = if (phoneFeature.isPermissionBlocked(sitePermissions)) {
|
||||
label.isEnabled = false
|
||||
phoneFeature.disabledIcon
|
||||
} else {
|
||||
label.isEnabled = true
|
||||
phoneFeature.enabledIcon
|
||||
}
|
||||
|
||||
label.setCompoundDrawablesWithIntrinsicBounds(icon, null, null, null)
|
||||
label.isEnabled = !phoneFeature.isPermissionBlocked(sitePermissions)
|
||||
blockedByAndroidPhoneFeatures.remove(phoneFeature)
|
||||
}
|
||||
|
||||
private fun checkFeaturesBlockedByAndroid(sitePermissions: SitePermissions?) {
|
||||
val clonedList = blockedByAndroidPhoneFeatures.toTypedArray()
|
||||
clonedList.forEach { phoneFeature ->
|
||||
blockedByAndroidPhoneFeatures.forEach { phoneFeature ->
|
||||
if (phoneFeature.isAndroidPermissionGranted(context)) {
|
||||
bindPhoneAction(phoneFeature, sitePermissions)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private val PhoneFeature.labelAndAction
|
||||
get(): Pair<TextView, TextView> {
|
||||
return when (this) {
|
||||
CAMERA -> camera_icon to camera_action_label
|
||||
LOCATION -> location_icon to location_action_label
|
||||
MICROPHONE -> microphone_icon to microphone_action_label
|
||||
NOTIFICATION -> notification_icon to notification_action_label
|
||||
}
|
||||
}
|
||||
|
||||
private val PhoneFeature.enabledIcon
|
||||
get(): Drawable {
|
||||
val drawableId = when (this) {
|
||||
CAMERA -> R.drawable.ic_camera
|
||||
LOCATION -> R.drawable.ic_location
|
||||
MICROPHONE -> R.drawable.ic_microphone
|
||||
NOTIFICATION -> R.drawable.ic_notification
|
||||
}
|
||||
return requireNotNull(AppCompatResources.getDrawable(context, drawableId))
|
||||
}
|
||||
|
||||
private val PhoneFeature.disabledIcon
|
||||
get(): Drawable {
|
||||
val drawableId = when (this) {
|
||||
CAMERA -> R.drawable.ic_camera_disabled
|
||||
LOCATION -> R.drawable.ic_location_disabled
|
||||
MICROPHONE -> R.drawable.ic_microphone_disabled
|
||||
NOTIFICATION -> R.drawable.ic_notifications_disabled
|
||||
}
|
||||
return requireNotNull(AppCompatResources.getDrawable(context, drawableId))
|
||||
}
|
||||
private fun findLabelActionPair(@IdRes labelId: Int, @IdRes actionId: Int): LabelActionPair {
|
||||
return view.findViewById<TextView>(labelId) to view.findViewById(actionId)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
package org.mozilla.fenix.settings.quicksettings
|
||||
|
||||
import android.view.View
|
||||
import android.widget.CompoundButton
|
||||
import android.widget.Switch
|
||||
import android.widget.TextView
|
||||
import androidx.core.view.isVisible
|
||||
import io.reactivex.Observer
|
||||
import mozilla.components.support.ktx.android.view.putCompoundDrawablesRelativeWithIntrinsicBounds
|
||||
import org.mozilla.fenix.R
|
||||
import org.mozilla.fenix.utils.Settings
|
||||
|
||||
class TrackingProtectionSettingView(
|
||||
container: View,
|
||||
private val actionEmitter: Observer<QuickSettingsAction>
|
||||
) : View.OnClickListener, CompoundButton.OnCheckedChangeListener {
|
||||
private val trackingProtectionSwitch: Switch = container.findViewById(R.id.tracking_protection)
|
||||
private val trackingProtectionAction: TextView = container.findViewById(R.id.tracking_protection_action)
|
||||
|
||||
init {
|
||||
trackingProtectionSwitch.putCompoundDrawablesRelativeWithIntrinsicBounds(
|
||||
start = container.context.getDrawable(R.drawable.ic_tracking_protection)
|
||||
)
|
||||
}
|
||||
|
||||
fun bind(isTrackingProtectionOn: Boolean) {
|
||||
val globalTPSetting = Settings.getInstance(trackingProtectionSwitch.context).shouldUseTrackingProtection
|
||||
|
||||
trackingProtectionAction.isVisible = !globalTPSetting
|
||||
trackingProtectionAction.setOnClickListener(this)
|
||||
|
||||
trackingProtectionSwitch.isChecked = isTrackingProtectionOn
|
||||
trackingProtectionSwitch.isEnabled = globalTPSetting
|
||||
trackingProtectionSwitch.setOnCheckedChangeListener(this)
|
||||
}
|
||||
|
||||
override fun onClick(view: View) {
|
||||
actionEmitter.onNext(
|
||||
QuickSettingsAction.SelectTrackingProtectionSettings
|
||||
)
|
||||
}
|
||||
|
||||
override fun onCheckedChanged(buttonView: CompoundButton, isChecked: Boolean) {
|
||||
actionEmitter.onNext(
|
||||
QuickSettingsAction.ToggleTrackingProtection(isChecked)
|
||||
)
|
||||
}
|
||||
}
|
13
app/src/main/res/animator/fill_disable.xml
Normal file
13
app/src/main/res/animator/fill_disable.xml
Normal file
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<objectAnimator
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:propertyName="fillColor"
|
||||
android:startOffset="@integer/strike_thru_start_offset"
|
||||
android:duration="@integer/strike_thru_duration"
|
||||
android:valueFrom="?primaryText"
|
||||
android:valueTo="@color/disabled_text"
|
||||
android:valueType="colorType"
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in" />
|
13
app/src/main/res/animator/fill_enable.xml
Normal file
13
app/src/main/res/animator/fill_enable.xml
Normal file
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<objectAnimator
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:propertyName="fillColor"
|
||||
android:startOffset="@integer/strike_thru_start_offset"
|
||||
android:duration="@integer/strike_thru_duration"
|
||||
android:valueFrom="@color/disabled_text"
|
||||
android:valueTo="?primaryText"
|
||||
android:valueType="colorType"
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in" />
|
13
app/src/main/res/animator/strike_thru_mask_disable.xml
Normal file
13
app/src/main/res/animator/strike_thru_mask_disable.xml
Normal file
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<objectAnimator
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:propertyName="pathData"
|
||||
android:startOffset="@integer/strike_thru_start_offset"
|
||||
android:duration="@integer/strike_thru_duration"
|
||||
android:valueFrom="M 0 0 L 0 24 L 24 24 L 24 0 L 0 0 Z M 21 2 L 23 4 L 23 4 L 21 2 L 21 2 Z"
|
||||
android:valueTo="M 0 0 L 0 24 L 24 24 L 24 0 L 0 0 Z M 21 2 L 23 4 L 6 21 L 4 19 L 21 2 Z"
|
||||
android:valueType="pathType"
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in" />
|
13
app/src/main/res/animator/strike_thru_mask_enable.xml
Normal file
13
app/src/main/res/animator/strike_thru_mask_enable.xml
Normal file
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<objectAnimator
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:propertyName="pathData"
|
||||
android:startOffset="@integer/strike_thru_start_offset"
|
||||
android:duration="@integer/strike_thru_duration"
|
||||
android:valueFrom="M 0 0 L 0 24 L 24 24 L 24 0 L 0 0 Z M 21 2 L 23 4 L 6 21 L 4 19 L 21 2 Z"
|
||||
android:valueTo="M 0 0 L 0 24 L 24 24 L 24 0 L 0 0 Z M 21 2 L 23 4 L 23 4 L 21 2 L 21 2 Z"
|
||||
android:valueType="pathType"
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in" />
|
22
app/src/main/res/animator/strike_thru_path_disable.xml
Normal file
22
app/src/main/res/animator/strike_thru_path_disable.xml
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<objectAnimator
|
||||
android:propertyName="pathData"
|
||||
android:startOffset="@integer/strike_thru_start_offset"
|
||||
android:duration="@integer/strike_thru_duration"
|
||||
android:valueFrom="M 20 1.6 L 21.4 3 L 21.9 2.5 C 20.9 3.5 19.5 2 20.5 1.1 L 20 1.6 Z"
|
||||
android:valueTo="M 20 1.6 L 21.4 3 L 5.2 19.2 C 4.2 20.2 2.8 18.8 3.8 17.8 L 20 1.6 Z"
|
||||
android:valueType="pathType"
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in" />
|
||||
<objectAnimator
|
||||
android:propertyName="fillColor"
|
||||
android:startOffset="@integer/strike_thru_start_offset"
|
||||
android:duration="@integer/strike_thru_duration"
|
||||
android:valueFrom="?primaryText"
|
||||
android:valueTo="@color/disabled_text"
|
||||
android:valueType="colorType"
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in" />
|
||||
</set>
|
22
app/src/main/res/animator/strike_thru_path_enable.xml
Normal file
22
app/src/main/res/animator/strike_thru_path_enable.xml
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<objectAnimator
|
||||
android:propertyName="pathData"
|
||||
android:startOffset="@integer/strike_thru_start_offset"
|
||||
android:duration="@integer/strike_thru_duration"
|
||||
android:valueFrom="M 20 1.6 L 21.4 3 L 5.2 19.2 C 4.2 20.2 2.8 18.8 3.8 17.8 L 20 1.6 Z"
|
||||
android:valueTo="M 20 1.6 L 21.4 3 L 21.9 2.5 C 20.9 3.5 19.5 2 20.5 1.1 L 20 1.6 Z"
|
||||
android:valueType="pathType"
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in" />
|
||||
<objectAnimator
|
||||
android:propertyName="fillColor"
|
||||
android:startOffset="@integer/strike_thru_start_offset"
|
||||
android:duration="@integer/strike_thru_duration"
|
||||
android:valueFrom="@color/disabled_text"
|
||||
android:valueTo="?primaryText"
|
||||
android:valueType="colorType"
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in" />
|
||||
</set>
|
|
@ -2,11 +2,21 @@
|
|||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path android:fillColor="?primaryText"
|
||||
android:pathData="M17,10.5V7c0,-0.55 -0.45,-1 -1,-1H4c-0.55,0 -1,0.45 -1,1v10c0,0.55 0.45,1 1,1h12c0.55,0 1,-0.45 1,-1v-3.5l4,4v-11l-4,4z"/>
|
||||
</vector>
|
||||
<animated-selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:id="@+id/enabled"
|
||||
android:drawable="@drawable/ic_camera_enabled"
|
||||
android:state_enabled="true" />
|
||||
<item
|
||||
android:id="@+id/disabled"
|
||||
android:drawable="@drawable/ic_camera_disabled" />
|
||||
|
||||
<transition
|
||||
android:drawable="@drawable/ic_camera_anim_enable"
|
||||
android:fromId="@id/disabled"
|
||||
android:toId="@id/enabled" />
|
||||
<transition
|
||||
android:drawable="@drawable/ic_camera_anim_disable"
|
||||
android:fromId="@+id/enabled"
|
||||
android:toId="@+id/disabled" />
|
||||
</animated-selector>
|
||||
|
|
11
app/src/main/res/drawable/ic_camera_anim_disable.xml
Normal file
11
app/src/main/res/drawable/ic_camera_anim_disable.xml
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<animated-vector
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:drawable="@drawable/ic_camera_enabled">
|
||||
<target android:name="strike_thru_path" android:animation="@animator/strike_thru_path_disable" />
|
||||
<target android:name="strike_thru_mask" android:animation="@animator/strike_thru_mask_disable" />
|
||||
<target android:name="icon" android:animation="@animator/fill_disable" />
|
||||
</animated-vector>
|
11
app/src/main/res/drawable/ic_camera_anim_enable.xml
Normal file
11
app/src/main/res/drawable/ic_camera_anim_enable.xml
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<animated-vector
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:drawable="@drawable/ic_camera_disabled">
|
||||
<target android:name="strike_thru_path" android:animation="@animator/strike_thru_path_enable" />
|
||||
<target android:name="strike_thru_mask" android:animation="@animator/strike_thru_mask_enable" />
|
||||
<target android:name="icon" android:animation="@animator/fill_enable" />
|
||||
</animated-vector>
|
|
@ -3,11 +3,25 @@
|
|||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@color/disabled_text"
|
||||
android:pathData="M21.46,6.16L8.63,19h5.55A1.88,1.88 0,0 0,16 17.06v-2.73l4.4,3.41A1,1 0,0 0,22 17L22,7a1,1 0,0 0,-0.54 -0.84zM21.71,2.29a1,1 0,0 0,-1.42 0L16,6.62A1.84,1.84 0,0 0,14.18 5L3.81,5A1.88,1.88 0,0 0,2 6.94v10.12A1.89,1.89 0,0 0,3.61 19l-1.32,1.29a1,1 0,0 0,0 1.42,1 1,0 0,0 1.42,0l18,-18a1,1 0,0 0,0 -1.42z"/>
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<group>
|
||||
<clip-path android:pathData="M 18.8 2.8 C 19.8 1.8 21.1 3.3 20.2 4.2 L 3.4 21 L 2 19.6 L 18.8 2.8 Z"/>
|
||||
<path
|
||||
android:name="strike_thru_path"
|
||||
android:pathData="M 20 1.6 L 21.4 3 L 5.2 19.2 C 4.2 20.2 2.8 18.8 3.8 17.8 L 20 1.6 Z"
|
||||
android:fillColor="@color/disabled_text"
|
||||
android:strokeWidth="1"/>
|
||||
</group>
|
||||
<group>
|
||||
<clip-path
|
||||
android:name="strike_thru_mask"
|
||||
android:pathData="M 0 0 L 0 24 L 24 24 L 24 0 L 0 0 Z M 21 2 L 23 4 L 6 21 L 4 19 L 21 2 Z"/>
|
||||
<path
|
||||
android:name="icon"
|
||||
android:fillColor="@color/disabled_text"
|
||||
android:pathData="M17 16a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8c0-1.1 0.9-2 2-2h10a2 2 0 0 1 2 2v2l2.9-2.8c0.4-0.4 1.07 0 1.07 0.62v8.4c0 0.6-0.6 1.06-1.07 0.6L17 14v2z" />
|
||||
</group>
|
||||
</vector>
|
||||
|
|
27
app/src/main/res/drawable/ic_camera_enabled.xml
Normal file
27
app/src/main/res/drawable/ic_camera_enabled.xml
Normal file
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<group>
|
||||
<clip-path android:pathData="M 18.8 2.8 C 19.8 1.8 21.1 3.3 20.2 4.2 L 3.4 21 L 2 19.6 L 18.8 2.8 Z"/>
|
||||
<path
|
||||
android:name="strike_thru_path"
|
||||
android:pathData="M 20 1.6 L 21.4 3 L 21.9 2.5 C 20.9 3.5 19.5 2 20.5 1.1 L 20 1.6 Z"
|
||||
android:fillColor="?primaryText"
|
||||
android:strokeWidth="1"/>
|
||||
</group>
|
||||
<group>
|
||||
<clip-path
|
||||
android:name="strike_thru_mask"
|
||||
android:pathData="M 0 0 L 0 24 L 24 24 L 24 0 L 0 0 Z M 21 2 L 23 4 L 23 4 L 21 2 L 21 2 Z"/>
|
||||
<path
|
||||
android:name="icon"
|
||||
android:fillColor="?primaryText"
|
||||
android:pathData="M17 16a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8c0-1.1 0.9-2 2-2h10a2 2 0 0 1 2 2v2l2.9-2.8c0.4-0.4 1.07 0 1.07 0.62v8.4c0 0.6-0.6 1.06-1.07 0.6L17 14v2z" />
|
||||
</group>
|
||||
</vector>
|
|
@ -2,12 +2,21 @@
|
|||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="?primaryText"
|
||||
android:pathData="M12,9a3,3 0,1 0,3 3,3 3,0 0,0 -3,-3zM21,11h-1.07A8,8 0,0 0,13 4.07L13,3a1,1 0,0 0,-2 0v1.07A8,8 0,0 0,4.07 11L3,11a1,1 0,0 0,0 2h1.07A8,8 0,0 0,11 19.93L11,21a1,1 0,0 0,2 0v-1.07A8,8 0,0 0,19.93 13L21,13a1,1 0,0 0,0 -2zM12,18a6,6 0,1 1,6 -6,6 6,0 0,1 -6,6z"/>
|
||||
</vector>
|
||||
<animated-selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:id="@+id/enabled"
|
||||
android:drawable="@drawable/ic_location_enabled"
|
||||
android:state_enabled="true" />
|
||||
<item
|
||||
android:id="@+id/disabled"
|
||||
android:drawable="@drawable/ic_location_disabled" />
|
||||
|
||||
<transition
|
||||
android:drawable="@drawable/ic_location_anim_enable"
|
||||
android:fromId="@id/disabled"
|
||||
android:toId="@id/enabled" />
|
||||
<transition
|
||||
android:drawable="@drawable/ic_location_anim_disable"
|
||||
android:fromId="@+id/enabled"
|
||||
android:toId="@+id/disabled" />
|
||||
</animated-selector>
|
||||
|
|
11
app/src/main/res/drawable/ic_location_anim_disable.xml
Normal file
11
app/src/main/res/drawable/ic_location_anim_disable.xml
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<animated-vector
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:drawable="@drawable/ic_location_enabled">
|
||||
<target android:name="strike_thru_path" android:animation="@animator/strike_thru_path_disable" />
|
||||
<target android:name="strike_thru_mask" android:animation="@animator/strike_thru_mask_disable" />
|
||||
<target android:name="icon" android:animation="@animator/fill_disable" />
|
||||
</animated-vector>
|
11
app/src/main/res/drawable/ic_location_anim_enable.xml
Normal file
11
app/src/main/res/drawable/ic_location_anim_enable.xml
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<animated-vector
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:drawable="@drawable/ic_location_disabled">
|
||||
<target android:name="strike_thru_path" android:animation="@animator/strike_thru_path_enable" />
|
||||
<target android:name="strike_thru_mask" android:animation="@animator/strike_thru_mask_enable" />
|
||||
<target android:name="icon" android:animation="@animator/fill_enable" />
|
||||
</animated-vector>
|
|
@ -3,11 +3,25 @@
|
|||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@color/disabled_text"
|
||||
android:pathData="M21.71,2.29a1,1 0,0 0,-1.42 0l-3.4,3.41A7.92,7.92 0,0 0,13 4.07L13,3a1,1 0,0 0,-2 0v1.07A8,8 0,0 0,4.07 11L3,11a1,1 0,0 0,0 2h1.07a7.92,7.92 0,0 0,1.63 3.89l-3.41,3.4a1,1 0,0 0,0 1.42,1 1,0 0,0 1.42,0l18,-18a1,1 0,0 0,0 -1.42zM13.29,9.29A3,3 0,0 0,12 9a3,3 0,0 0,-3 3,3 3,0 0,0 0.3,1.29l-2.18,2.18a6,6 0,0 1,8.35 -8.35zM21,11h-1.07a8,8 0,0 0,-0.76 -2.54L17.64,10a5.88,5.88 0,0 1,0.36 2,6 6,0 0,1 -6,6 5.88,5.88 0,0 1,-2 -0.36l-1.54,1.53a8,8 0,0 0,2.54 0.76L11,21a1,1 0,0 0,2 0v-1.07A8,8 0,0 0,19.93 13L21,13a1,1 0,0 0,0 -2z"/>
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<group>
|
||||
<clip-path android:pathData="M 18.8 2.8 C 19.8 1.8 21.1 3.3 20.2 4.2 L 3.4 21 L 2 19.6 L 18.8 2.8 Z"/>
|
||||
<path
|
||||
android:name="strike_thru_path"
|
||||
android:pathData="M 20 1.6 L 21.4 3 L 5.2 19.2 C 4.2 20.2 2.8 18.8 3.8 17.8 L 20 1.6 Z"
|
||||
android:fillColor="@color/disabled_text"
|
||||
android:strokeWidth="1"/>
|
||||
</group>
|
||||
<group>
|
||||
<clip-path
|
||||
android:name="strike_thru_mask"
|
||||
android:pathData="M 0 0 L 0 24 L 24 24 L 24 0 L 0 0 Z M 21 2 L 23 4 L 6 21 L 4 19 L 21 2 Z"/>
|
||||
<path
|
||||
android:name="icon"
|
||||
android:fillColor="@color/disabled_text"
|
||||
android:pathData="M12,9a3,3 0,1 0,3 3,3 3,0 0,0 -3,-3zM21,11h-1.07A8,8 0,0 0,13 4.07L13,3a1,1 0,0 0,-2 0v1.07A8,8 0,0 0,4.07 11L3,11a1,1 0,0 0,0 2h1.07A8,8 0,0 0,11 19.93L11,21a1,1 0,0 0,2 0v-1.07A8,8 0,0 0,19.93 13L21,13a1,1 0,0 0,0 -2zM12,18a6,6 0,1 1,6 -6,6 6,0 0,1 -6,6z" />
|
||||
</group>
|
||||
</vector>
|
||||
|
|
27
app/src/main/res/drawable/ic_location_enabled.xml
Normal file
27
app/src/main/res/drawable/ic_location_enabled.xml
Normal file
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<group>
|
||||
<clip-path android:pathData="M 18.8 2.8 C 19.8 1.8 21.1 3.3 20.2 4.2 L 3.4 21 L 2 19.6 L 18.8 2.8 Z"/>
|
||||
<path
|
||||
android:name="strike_thru_path"
|
||||
android:pathData="M 20 1.6 L 21.4 3 L 21.9 2.5 C 20.9 3.5 19.5 2 20.5 1.1 L 20 1.6 Z"
|
||||
android:fillColor="?primaryText"
|
||||
android:strokeWidth="1"/>
|
||||
</group>
|
||||
<group>
|
||||
<clip-path
|
||||
android:name="strike_thru_mask"
|
||||
android:pathData="M 0 0 L 0 24 L 24 24 L 24 0 L 0 0 Z M 21 2 L 23 4 L 23 4 L 21 2 L 21 2 Z"/>
|
||||
<path
|
||||
android:name="icon"
|
||||
android:fillColor="?primaryText"
|
||||
android:pathData="M12,9a3,3 0,1 0,3 3,3 3,0 0,0 -3,-3zM21,11h-1.07A8,8 0,0 0,13 4.07L13,3a1,1 0,0 0,-2 0v1.07A8,8 0,0 0,4.07 11L3,11a1,1 0,0 0,0 2h1.07A8,8 0,0 0,11 19.93L11,21a1,1 0,0 0,2 0v-1.07A8,8 0,0 0,19.93 13L21,13a1,1 0,0 0,0 -2zM12,18a6,6 0,1 1,6 -6,6 6,0 0,1 -6,6z" />
|
||||
</group>
|
||||
</vector>
|
|
@ -2,12 +2,21 @@
|
|||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M17,11v-1c0,-0.552 0.448,-1 1,-1s1,0.5 1,1v1c0,3.5 -2.6,6.4 -6,6.9L13,21c0,0.6 -0.5,1 -1,1s-1,-0.5 -1,-1v-3c-3.4,-0.5 -6,-3.4 -6,-7v-1c0,-0.6 0.5,-1 1,-1s1,0.5 1,1v1c0,2.8 2.2,5 5,5s5,-2.2 5,-5zM12,2c1.7,0 3,1.3 3,3v6c0,1.7 -1.3,3 -3,3s-3,-1.343 -3,-3L9,5c0,-1.657 1.343,-3 3,-3z"
|
||||
android:fillColor="?primaryText"/>
|
||||
</vector>
|
||||
<animated-selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:id="@+id/enabled"
|
||||
android:drawable="@drawable/ic_microphone_enabled"
|
||||
android:state_enabled="true" />
|
||||
<item
|
||||
android:id="@+id/disabled"
|
||||
android:drawable="@drawable/ic_microphone_disabled" />
|
||||
|
||||
<transition
|
||||
android:drawable="@drawable/ic_microphone_anim_enable"
|
||||
android:fromId="@id/disabled"
|
||||
android:toId="@id/enabled" />
|
||||
<transition
|
||||
android:drawable="@drawable/ic_microphone_anim_disable"
|
||||
android:fromId="@+id/enabled"
|
||||
android:toId="@+id/disabled" />
|
||||
</animated-selector>
|
||||
|
|
11
app/src/main/res/drawable/ic_microphone_anim_disable.xml
Normal file
11
app/src/main/res/drawable/ic_microphone_anim_disable.xml
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<animated-vector
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:drawable="@drawable/ic_microphone_enabled">
|
||||
<target android:name="strike_thru_path" android:animation="@animator/strike_thru_path_disable" />
|
||||
<target android:name="strike_thru_mask" android:animation="@animator/strike_thru_mask_disable" />
|
||||
<target android:name="icon" android:animation="@animator/fill_disable" />
|
||||
</animated-vector>
|
11
app/src/main/res/drawable/ic_microphone_anim_enable.xml
Normal file
11
app/src/main/res/drawable/ic_microphone_anim_enable.xml
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<animated-vector
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:drawable="@drawable/ic_microphone_disabled">
|
||||
<target android:name="strike_thru_path" android:animation="@animator/strike_thru_path_enable" />
|
||||
<target android:name="strike_thru_mask" android:animation="@animator/strike_thru_mask_enable" />
|
||||
<target android:name="icon" android:animation="@animator/fill_enable" />
|
||||
</animated-vector>
|
|
@ -3,12 +3,25 @@
|
|||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@color/disabled_text"
|
||||
android:pathData="M5,11v-1c0,-0.552 0.448,-1 1,-1s1,0.448 1,1v1c0,1.275 0.477,2.44 1.263,3.322l1.419,-1.418C9.256,12.386 9,11.723 9,11L9,5c0,-1.657 1.343,-3 3,-3s3,1.343 3,3v2.586l5.293,-5.293c0.39,-0.39 1.024,-0.39 1.414,0 0.39,0.39 0.39,1.024 0,1.414l-18,18c-0.39,0.39 -1.024,0.39 -1.414,0 -0.39,-0.39 -0.39,-1.024 0,-1.414l4.554,-4.555C5.7,14.492 5,12.828 5,11zM17,10.414l1.35,-1.35c0.38,0.141 0.65,0.507 0.65,0.936v1c0,3.526 -2.608,6.444 -6,6.93L13,21c0,0.552 -0.448,1 -1,1s-1,-0.448 -1,-1v-3.07c-0.422,-0.061 -0.831,-0.159 -1.225,-0.291l1.67,-1.67c0.182,0.02 0.367,0.031 0.555,0.031 2.761,0 5,-2.239 5,-5v-0.586z"
|
||||
/>
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<group>
|
||||
<clip-path android:pathData="M 18.8 2.8 C 19.8 1.8 21.1 3.3 20.2 4.2 L 3.4 21 L 2 19.6 L 18.8 2.8 Z"/>
|
||||
<path
|
||||
android:name="strike_thru_path"
|
||||
android:pathData="M 20 1.6 L 21.4 3 L 5.2 19.2 C 4.2 20.2 2.8 18.8 3.8 17.8 L 20 1.6 Z"
|
||||
android:fillColor="@color/disabled_text"
|
||||
android:strokeWidth="1"/>
|
||||
</group>
|
||||
<group>
|
||||
<clip-path
|
||||
android:name="strike_thru_mask"
|
||||
android:pathData="M 0 0 L 0 24 L 24 24 L 24 0 L 0 0 Z M 21 2 L 23 4 L 6 21 L 4 19 L 21 2 Z"/>
|
||||
<path
|
||||
android:name="icon"
|
||||
android:fillColor="@color/disabled_text"
|
||||
android:pathData="M17,11v-1c0,-0.552 0.448,-1 1,-1s1,0.5 1,1v1c0,3.5 -2.6,6.4 -6,6.9L13,21c0,0.6 -0.5,1 -1,1s-1,-0.5 -1,-1v-3c-3.4,-0.5 -6,-3.4 -6,-7v-1c0,-0.6 0.5,-1 1,-1s1,0.5 1,1v1c0,2.8 2.2,5 5,5s5,-2.2 5,-5zM12,2c1.7,0 3,1.3 3,3v6c0,1.7 -1.3,3 -3,3s-3,-1.343 -3,-3L9,5c0,-1.657 1.343,-3 3,-3z" />
|
||||
</group>
|
||||
</vector>
|
||||
|
|
27
app/src/main/res/drawable/ic_microphone_enabled.xml
Normal file
27
app/src/main/res/drawable/ic_microphone_enabled.xml
Normal file
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<group>
|
||||
<clip-path android:pathData="M 18.8 2.8 C 19.8 1.8 21.1 3.3 20.2 4.2 L 3.4 21 L 2 19.6 L 18.8 2.8 Z"/>
|
||||
<path
|
||||
android:name="strike_thru_path"
|
||||
android:pathData="M 20 1.6 L 21.4 3 L 21.9 2.5 C 20.9 3.5 19.5 2 20.5 1.1 L 20 1.6 Z"
|
||||
android:fillColor="?primaryText"
|
||||
android:strokeWidth="1"/>
|
||||
</group>
|
||||
<group>
|
||||
<clip-path
|
||||
android:name="strike_thru_mask"
|
||||
android:pathData="M 0 0 L 0 24 L 24 24 L 24 0 L 0 0 Z M 21 2 L 23 4 L 23 4 L 21 2 L 21 2 Z"/>
|
||||
<path
|
||||
android:name="icon"
|
||||
android:fillColor="?primaryText"
|
||||
android:pathData="M17,11v-1c0,-0.552 0.448,-1 1,-1s1,0.5 1,1v1c0,3.5 -2.6,6.4 -6,6.9L13,21c0,0.6 -0.5,1 -1,1s-1,-0.5 -1,-1v-3c-3.4,-0.5 -6,-3.4 -6,-7v-1c0,-0.6 0.5,-1 1,-1s1,0.5 1,1v1c0,2.8 2.2,5 5,5s5,-2.2 5,-5zM12,2c1.7,0 3,1.3 3,3v6c0,1.7 -1.3,3 -3,3s-3,-1.343 -3,-3L9,5c0,-1.657 1.343,-3 3,-3z" />
|
||||
</group>
|
||||
</vector>
|
|
@ -1,13 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="?primaryText"
|
||||
android:pathData="M19 3H5a3 3 0 0 0-3 3v8a3 3 0 0 0 3 3h7.6l3.7 3.7A1 1 0 0 0 18 20v-3h1a3 3 0 0 0 3-3V6a3 3 0 0 0-3-3zm1 11c0 0.6-0.4 1-1 1h-2a1 1 0 0 0-1 1v1.6l-2.3-2.3a1 1 0 0 0-0.7-0.3H5a1 1 0 0 1-1-1V6c0-0.6 0.4-1 1-1h14c0.6 0 1 0.4 1 1v8zm-3.5-6h-9a0.5 0.5 0 0 0 0 1h9a0.5 0.5 0 0 0 0-1zm0 3h-9a0.5 0.5 0 0 0 0 1h9a0.5 0.5 0 0 0 0-1z" />
|
||||
</vector>
|
22
app/src/main/res/drawable/ic_notifications.xml
Normal file
22
app/src/main/res/drawable/ic_notifications.xml
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<animated-selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:id="@+id/enabled"
|
||||
android:drawable="@drawable/ic_notifications_enabled"
|
||||
android:state_enabled="true" />
|
||||
<item
|
||||
android:id="@+id/disabled"
|
||||
android:drawable="@drawable/ic_notifications_disabled" />
|
||||
|
||||
<transition
|
||||
android:drawable="@drawable/ic_notifications_anim_enable"
|
||||
android:fromId="@id/disabled"
|
||||
android:toId="@id/enabled" />
|
||||
<transition
|
||||
android:drawable="@drawable/ic_notifications_anim_disable"
|
||||
android:fromId="@+id/enabled"
|
||||
android:toId="@+id/disabled" />
|
||||
</animated-selector>
|
11
app/src/main/res/drawable/ic_notifications_anim_disable.xml
Normal file
11
app/src/main/res/drawable/ic_notifications_anim_disable.xml
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<animated-vector
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:drawable="@drawable/ic_notifications_enabled">
|
||||
<target android:name="strike_thru_path" android:animation="@animator/strike_thru_path_disable" />
|
||||
<target android:name="strike_thru_mask" android:animation="@animator/strike_thru_mask_disable" />
|
||||
<target android:name="icon" android:animation="@animator/fill_disable" />
|
||||
</animated-vector>
|
11
app/src/main/res/drawable/ic_notifications_anim_enable.xml
Normal file
11
app/src/main/res/drawable/ic_notifications_anim_enable.xml
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<animated-vector
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:drawable="@drawable/ic_notifications_disabled">
|
||||
<target android:name="strike_thru_path" android:animation="@animator/strike_thru_path_enable" />
|
||||
<target android:name="strike_thru_mask" android:animation="@animator/strike_thru_mask_enable" />
|
||||
<target android:name="icon" android:animation="@animator/fill_enable" />
|
||||
</animated-vector>
|
|
@ -3,11 +3,25 @@
|
|||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@color/disabled_text"
|
||||
android:pathData="M21.759,4.824L20,6.583L20,14a1,1 0,0 1,-1 1h-2a1,1 0,0 0,-1 1v1.586l-2.293,-2.293A1,1 0,0 0,13 15h-1.417l-2,2h3l3.707,3.707A1,1 0,0 0,17 21a0.987,0.987 0,0 0,0.383 -0.076A1,1 0,0 0,18 20v-3h1a3,3 0,0 0,3 -3L22,6a2.979,2.979 0,0 0,-0.241 -1.176zM20.207,2.793a1,1 0,0 0,-1.414 0L18.586,3L5,3a3,3 0,0 0,-3 3v8a2.994,2.994 0,0 0,2.624 2.962l-0.831,0.831a1,1 0,1 0,1.414 1.414l15,-15a1,1 0,0 0,0 -1.414zM13.586,8L7.5,8a0.5,0.5 0,0 0,0 1h5.086l-2,2L7.5,11a0.5,0.5 0,0 0,0 1h2.086l-3,3L5,15a1,1 0,0 1,-1 -1L4,6a1,1 0,0 1,1 -1h11.586z"/>
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<group>
|
||||
<clip-path android:pathData="M 18.8 2.8 C 19.8 1.8 21.1 3.3 20.2 4.2 L 3.4 21 L 2 19.6 L 18.8 2.8 Z"/>
|
||||
<path
|
||||
android:name="strike_thru_path"
|
||||
android:pathData="M 20 1.6 L 21.4 3 L 5.2 19.2 C 4.2 20.2 2.8 18.8 3.8 17.8 L 20 1.6 Z"
|
||||
android:fillColor="@color/disabled_text"
|
||||
android:strokeWidth="1"/>
|
||||
</group>
|
||||
<group>
|
||||
<clip-path
|
||||
android:name="strike_thru_mask"
|
||||
android:pathData="M 0 0 L 0 24 L 24 24 L 24 0 L 0 0 Z M 21 2 L 23 4 L 6 21 L 4 19 L 21 2 Z"/>
|
||||
<path
|
||||
android:name="icon"
|
||||
android:fillColor="@color/disabled_text"
|
||||
android:pathData="M19 3H5a3 3 0 0 0-3 3v8a3 3 0 0 0 3 3h7.6l3.7 3.7A1 1 0 0 0 18 20v-3h1a3 3 0 0 0 3-3V6a3 3 0 0 0-3-3zm1 11c0 0.6-0.4 1-1 1h-2a1 1 0 0 0-1 1v1.6l-2.3-2.3a1 1 0 0 0-0.7-0.3H5a1 1 0 0 1-1-1V6c0-0.6 0.4-1 1-1h14c0.6 0 1 0.4 1 1v8zm-3.5-6h-9a0.5 0.5 0 0 0 0 1h9a0.5 0.5 0 0 0 0-1zm0 3h-9a0.5 0.5 0 0 0 0 1h9a0.5 0.5 0 0 0 0-1z" />
|
||||
</group>
|
||||
</vector>
|
||||
|
|
27
app/src/main/res/drawable/ic_notifications_enabled.xml
Normal file
27
app/src/main/res/drawable/ic_notifications_enabled.xml
Normal file
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<group>
|
||||
<clip-path android:pathData="M 18.8 2.8 C 19.8 1.8 21.1 3.3 20.2 4.2 L 3.4 21 L 2 19.6 L 18.8 2.8 Z"/>
|
||||
<path
|
||||
android:name="strike_thru_path"
|
||||
android:pathData="M 20 1.6 L 21.4 3 L 21.9 2.5 C 20.9 3.5 19.5 2 20.5 1.1 L 20 1.6 Z"
|
||||
android:fillColor="?primaryText"
|
||||
android:strokeWidth="1"/>
|
||||
</group>
|
||||
<group>
|
||||
<clip-path
|
||||
android:name="strike_thru_mask"
|
||||
android:pathData="M 0 0 L 0 24 L 24 24 L 24 0 L 0 0 Z M 21 2 L 23 4 L 23 4 L 21 2 L 21 2 Z"/>
|
||||
<path
|
||||
android:name="icon"
|
||||
android:fillColor="?primaryText"
|
||||
android:pathData="M19 3H5a3 3 0 0 0-3 3v8a3 3 0 0 0 3 3h7.6l3.7 3.7A1 1 0 0 0 18 20v-3h1a3 3 0 0 0 3-3V6a3 3 0 0 0-3-3zm1 11c0 0.6-0.4 1-1 1h-2a1 1 0 0 0-1 1v1.6l-2.3-2.3a1 1 0 0 0-0.7-0.3H5a1 1 0 0 1-1-1V6c0-0.6 0.4-1 1-1h14c0.6 0 1 0.4 1 1v8zm-3.5-6h-9a0.5 0.5 0 0 0 0 1h9a0.5 0.5 0 0 0 0-1zm0 3h-9a0.5 0.5 0 0 0 0 1h9a0.5 0.5 0 0 0 0-1z" />
|
||||
</group>
|
||||
</vector>
|
|
@ -2,12 +2,21 @@
|
|||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="?primaryText"
|
||||
android:pathData="M20 6c0-1-0.8-1.9-1.8-2L12 3 5.8 4C4.8 4 4 5 4 6l0.1 5c0.3 3.2 1 5 2.5 7a8.4 8.4 0 0 0 5.3 3h0.2c2.1-0.3 4-1.4 5.3-3 1.6-2 2.2-3.8 2.5-7l0.1-5zm-2.1 4.8a10 10 0 0 1-2 6c-1 1.1-2.4 2-3.9 2.3a6.5 6.5 0 0 1-3.9-2.4 9.9 9.9 0 0 1-2-5.9 67.3 67.3 0 0 1 0-4.9L12 5l5.9 1 0.1 0.2-0.1 4.7zM8 7.6v3c0.3 2.7 0.8 3.7 1.7 5 0.6 0.6 1.4 1.2 2.3 1.4V7l-4 0.6z" />
|
||||
</vector>
|
||||
<animated-selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:id="@+id/enabled"
|
||||
android:drawable="@drawable/ic_tracking_protection_enabled"
|
||||
android:state_checked="true" />
|
||||
<item
|
||||
android:id="@+id/disabled"
|
||||
android:drawable="@drawable/ic_tracking_protection_disabled" />
|
||||
|
||||
<transition
|
||||
android:drawable="@drawable/ic_tracking_protection_anim_enable"
|
||||
android:fromId="@id/disabled"
|
||||
android:toId="@id/enabled" />
|
||||
<transition
|
||||
android:drawable="@drawable/ic_tracking_protection_anim_disable"
|
||||
android:fromId="@+id/enabled"
|
||||
android:toId="@+id/disabled" />
|
||||
</animated-selector>
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<animated-vector
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:drawable="@drawable/ic_tracking_protection_enabled">
|
||||
<target android:name="strike_thru_path" android:animation="@animator/strike_thru_path_disable" />
|
||||
<target android:name="strike_thru_mask" android:animation="@animator/strike_thru_mask_disable" />
|
||||
<target android:name="icon" android:animation="@animator/fill_disable" />
|
||||
</animated-vector>
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<animated-vector
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:drawable="@drawable/ic_tracking_protection_disabled">
|
||||
<target android:name="strike_thru_path" android:animation="@animator/strike_thru_path_enable" />
|
||||
<target android:name="strike_thru_mask" android:animation="@animator/strike_thru_mask_enable" />
|
||||
<target android:name="icon" android:animation="@animator/fill_enable" />
|
||||
</animated-vector>
|
|
@ -3,11 +3,25 @@
|
|||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="?primaryText"
|
||||
android:pathData="M17.9,10.825C17.92,10.583 17.939,10.228 17.955,9.8L19.994,7.757C19.988,8.963 19.958,10.284 19.888,11.017C19.584,14.191 18.966,15.932 17.437,17.911C16.1139,19.5759 14.209,20.6776 12.106,20.994L12,21.006L11.893,20.994C10.5742,20.796 9.3208,20.2893 8.235,19.515L9.683,18.067C10.3916,18.5151 11.1773,18.8277 12,18.989C13.5187,18.7058 14.8864,17.8899 15.857,16.688C17.153,15.01 17.631,13.641 17.9,10.825ZM20.207,3.793C20.5973,4.1812 20.6005,4.8119 20.214,5.204L5.214,20.204C4.9629,20.464 4.5911,20.5682 4.2415,20.4767C3.8919,20.3852 3.6188,20.1121 3.5273,19.7625C3.4358,19.4129 3.54,19.0411 3.8,18.79L5.8,16.79C4.7719,15.0326 4.1919,13.0494 4.111,11.015C4.012,9.973 4,7.767 4,6.1C4.0096,5.0498 4.7782,4.161 5.816,4L12,2.986L18.187,3.999C18.2894,4.0247 18.3897,4.0581 18.487,4.099L18.793,3.793C19.1835,3.4026 19.8165,3.4026 20.207,3.793ZM6.1,10.826C6.1631,12.3919 6.5575,13.9266 7.257,15.329L8.717,13.864C8.3635,12.8432 8.1528,11.7785 8.091,10.7C8.066,10.439 8.015,9.667 8,7.7L12,7.041L12,10.586L16.789,5.797L12,5.014L6.138,5.972C6.0646,5.9767 6.0058,6.0347 6,6.108C6,8.4 6.031,10.076 6.1,10.826Z" />
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<group>
|
||||
<clip-path android:pathData="M 18.8 2.8 C 19.8 1.8 21.1 3.3 20.2 4.2 L 3.4 21 L 2 19.6 L 18.8 2.8 Z"/>
|
||||
<path
|
||||
android:name="strike_thru_path"
|
||||
android:pathData="M 20 1.6 L 21.4 3 L 5.2 19.2 C 4.2 20.2 2.8 18.8 3.8 17.8 L 20 1.6 Z"
|
||||
android:fillColor="@color/disabled_text"
|
||||
android:strokeWidth="1"/>
|
||||
</group>
|
||||
<group>
|
||||
<clip-path
|
||||
android:name="strike_thru_mask"
|
||||
android:pathData="M 0 0 L 0 24 L 24 24 L 24 0 L 0 0 Z M 21 2 L 23 4 L 6 21 L 4 19 L 21 2 Z"/>
|
||||
<path
|
||||
android:name="icon"
|
||||
android:fillColor="@color/disabled_text"
|
||||
android:pathData="M20 6c0-1-0.8-1.9-1.8-2L12 3 5.8 4C4.8 4 4 5 4 6l0.1 5c0.3 3.2 1 5 2.5 7a8.4 8.4 0 0 0 5.3 3h0.2c2.1-0.3 4-1.4 5.3-3 1.6-2 2.2-3.8 2.5-7l0.1-5zm-2.1 4.8a10 10 0 0 1-2 6c-1 1.1-2.4 2-3.9 2.3a6.5 6.5 0 0 1-3.9-2.4 9.9 9.9 0 0 1-2-5.9 67.3 67.3 0 0 1 0-4.9L12 5l5.9 1 0.1 0.2-0.1 4.7zM8 7.6v3c0.3 2.7 0.8 3.7 1.7 5 0.6 0.6 1.4 1.2 2.3 1.4V7l-4 0.6z" />
|
||||
</group>
|
||||
</vector>
|
||||
|
|
27
app/src/main/res/drawable/ic_tracking_protection_enabled.xml
Normal file
27
app/src/main/res/drawable/ic_tracking_protection_enabled.xml
Normal file
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<group>
|
||||
<clip-path android:pathData="M 18.8 2.8 C 19.8 1.8 21.1 3.3 20.2 4.2 L 3.4 21 L 2 19.6 L 18.8 2.8 Z"/>
|
||||
<path
|
||||
android:name="strike_thru_path"
|
||||
android:pathData="M 20 1.6 L 21.4 3 L 21.9 2.5 C 20.9 3.5 19.5 2 20.5 1.1 L 20 1.6 Z"
|
||||
android:fillColor="?primaryText"
|
||||
android:strokeWidth="1"/>
|
||||
</group>
|
||||
<group>
|
||||
<clip-path
|
||||
android:name="strike_thru_mask"
|
||||
android:pathData="M 0 0 L 0 24 L 24 24 L 24 0 L 0 0 Z M 21 2 L 23 4 L 23 4 L 21 2 L 21 2 Z"/>
|
||||
<path
|
||||
android:name="icon"
|
||||
android:fillColor="?primaryText"
|
||||
android:pathData="M20 6c0-1-0.8-1.9-1.8-2L12 3 5.8 4C4.8 4 4 5 4 6l0.1 5c0.3 3.2 1 5 2.5 7a8.4 8.4 0 0 0 5.3 3h0.2c2.1-0.3 4-1.4 5.3-3 1.6-2 2.2-3.8 2.5-7l0.1-5zm-2.1 4.8a10 10 0 0 1-2 6c-1 1.1-2.4 2-3.9 2.3a6.5 6.5 0 0 1-3.9-2.4 9.9 9.9 0 0 1-2-5.9 67.3 67.3 0 0 1 0-4.9L12 5l5.9 1 0.1 0.2-0.1 4.7zM8 7.6v3c0.3 2.7 0.8 3.7 1.7 5 0.6 0.6 1.4 1.2 2.3 1.4V7l-4 0.6z" />
|
||||
</group>
|
||||
</vector>
|
|
@ -20,22 +20,24 @@
|
|||
<TextView
|
||||
android:id="@+id/url"
|
||||
style="@style/QuickSettingsText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/quicksettings_item_height"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="https://wikipedia.org" />
|
||||
tools:text="https://wikipedia.org"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/security_info"
|
||||
style="@style/QuickSettingsText.Icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/quicksettings_item_height"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/url"
|
||||
tools:drawableStartCompat="@drawable/mozac_ic_lock"
|
||||
tools:drawableStart="@drawable/mozac_ic_lock"
|
||||
tools:drawableTint="@color/photonGreen50"
|
||||
tools:text="Secure connection" />
|
||||
tools:text="Secure connection"
|
||||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/line_divider_security"
|
||||
|
@ -52,7 +54,7 @@
|
|||
style="@style/QuickSettingsText.Icon"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/quicksettings_item_height"
|
||||
android:drawableStart="@drawable/ic_tracking_protection"
|
||||
tools:drawableStart="@drawable/ic_tracking_protection"
|
||||
android:paddingEnd="24dp"
|
||||
android:text="@string/preferences_tracking_protection"
|
||||
app:layout_constraintBottom_toTopOf="@id/tracking_protection_action"
|
||||
|
@ -96,12 +98,13 @@
|
|||
<TextView
|
||||
android:id="@+id/camera_icon"
|
||||
style="@style/QuickSettingsText.Icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/quicksettings_item_height"
|
||||
android:text="@string/preference_phone_feature_camera"
|
||||
app:drawableStartCompat="@drawable/ic_camera"
|
||||
android:drawableStart="@drawable/ic_camera"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/line_divider" />
|
||||
app:layout_constraintTop_toBottomOf="@id/line_divider"
|
||||
app:layout_constraintEnd_toStartOf="@+id/camera_action_label"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/camera_action_label"
|
||||
|
@ -115,13 +118,13 @@
|
|||
<TextView
|
||||
android:id="@+id/microphone_icon"
|
||||
style="@style/QuickSettingsText.Icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/quicksettings_item_height"
|
||||
android:text="@string/preference_phone_feature_microphone"
|
||||
app:drawableStartCompat="@drawable/ic_microphone"
|
||||
android:drawableStart="@drawable/ic_microphone"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/camera_icon" />
|
||||
|
||||
app:layout_constraintTop_toBottomOf="@id/camera_icon"
|
||||
app:layout_constraintEnd_toStartOf="@+id/microphone_action_label"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/microphone_action_label"
|
||||
|
@ -135,12 +138,13 @@
|
|||
<TextView
|
||||
android:id="@+id/notification_icon"
|
||||
style="@style/QuickSettingsText.Icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/quicksettings_item_height"
|
||||
android:text="@string/preference_phone_feature_notification"
|
||||
app:drawableStartCompat="@drawable/ic_notification"
|
||||
android:drawableStart="@drawable/ic_notifications"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/microphone_icon" />
|
||||
app:layout_constraintTop_toBottomOf="@id/microphone_icon"
|
||||
app:layout_constraintEnd_toStartOf="@+id/notification_action_label" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/notification_action_label"
|
||||
|
@ -154,12 +158,13 @@
|
|||
<TextView
|
||||
android:id="@+id/location_icon"
|
||||
style="@style/QuickSettingsText.Icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/quicksettings_item_height"
|
||||
android:text="@string/preference_phone_feature_location"
|
||||
app:drawableStartCompat="@drawable/ic_location"
|
||||
android:drawableStart="@drawable/ic_location"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/notification_icon" />
|
||||
app:layout_constraintTop_toBottomOf="@id/notification_icon"
|
||||
app:layout_constraintEnd_toStartOf="@+id/location_action_label"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/location_action_label"
|
||||
|
|
8
app/src/main/res/values/integers.xml
Normal file
8
app/src/main/res/values/integers.xml
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<resources>
|
||||
<integer name="strike_thru_start_offset">0</integer>
|
||||
<integer name="strike_thru_duration">500</integer>
|
||||
</resources>
|
|
@ -5,25 +5,25 @@
|
|||
<androidx.preference.PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<androidx.preference.Preference
|
||||
android:icon="@drawable/ic_camera"
|
||||
android:icon="@drawable/ic_camera_enabled"
|
||||
android:key="@string/pref_key_phone_feature_camera"
|
||||
android:title="@string/preference_phone_feature_camera"
|
||||
android:summary="@string/preference_option_phone_feature_ask_to_allow"/>
|
||||
|
||||
<androidx.preference.Preference
|
||||
android:icon="@drawable/ic_location"
|
||||
android:icon="@drawable/ic_location_enabled"
|
||||
android:key="@string/pref_key_phone_feature_location"
|
||||
android:title="@string/preference_phone_feature_location"
|
||||
android:summary="@string/preference_option_phone_feature_ask_to_allow"/>
|
||||
|
||||
<androidx.preference.Preference
|
||||
android:icon="@drawable/ic_microphone"
|
||||
android:icon="@drawable/ic_microphone_enabled"
|
||||
android:key="@string/pref_key_phone_feature_microphone"
|
||||
android:title="@string/preference_phone_feature_microphone"
|
||||
android:summary="@string/preference_option_phone_feature_ask_to_allow"/>
|
||||
|
||||
<androidx.preference.Preference
|
||||
android:icon="@drawable/ic_notification"
|
||||
android:icon="@drawable/ic_notifications_enabled"
|
||||
android:key="@string/pref_key_phone_feature_notification"
|
||||
android:title="@string/preference_phone_feature_notification"
|
||||
android:summary="@string/preference_option_phone_feature_ask_to_allow"/>
|
||||
|
@ -32,4 +32,4 @@
|
|||
android:key="@string/pref_key_exceptions_clear_site_permissions"
|
||||
android:layout="@layout/layout_clear_permission_button"/>
|
||||
|
||||
</androidx.preference.PreferenceScreen>
|
||||
</androidx.preference.PreferenceScreen>
|
||||
|
|
|
@ -15,27 +15,27 @@
|
|||
app:iconSpaceReserved="false"
|
||||
app:allowDividerAbove="false">
|
||||
<androidx.preference.Preference
|
||||
android:icon="@drawable/ic_camera"
|
||||
android:icon="@drawable/ic_camera_enabled"
|
||||
android:key="@string/pref_key_phone_feature_camera"
|
||||
android:title="@string/preference_phone_feature_camera"
|
||||
android:summary="@string/preference_option_phone_feature_ask_to_allow"/>
|
||||
|
||||
<androidx.preference.Preference
|
||||
android:icon="@drawable/ic_location"
|
||||
android:icon="@drawable/ic_location_enabled"
|
||||
android:key="@string/pref_key_phone_feature_location"
|
||||
android:title="@string/preference_phone_feature_location"
|
||||
android:summary="@string/preference_option_phone_feature_ask_to_allow"/>
|
||||
|
||||
<androidx.preference.Preference
|
||||
android:icon="@drawable/ic_microphone"
|
||||
android:icon="@drawable/ic_microphone_enabled"
|
||||
android:key="@string/pref_key_phone_feature_microphone"
|
||||
android:title="@string/preference_phone_feature_microphone"
|
||||
android:summary="@string/preference_option_phone_feature_ask_to_allow"/>
|
||||
|
||||
<androidx.preference.Preference
|
||||
android:icon="@drawable/ic_notification"
|
||||
android:icon="@drawable/ic_notifications_enabled"
|
||||
android:key="@string/pref_key_phone_feature_notification"
|
||||
android:title="@string/preference_phone_feature_notification"
|
||||
android:summary="@string/preference_option_phone_feature_ask_to_allow"/>
|
||||
</androidx.preference.PreferenceCategory>
|
||||
</androidx.preference.PreferenceScreen>
|
||||
</androidx.preference.PreferenceScreen>
|
||||
|
|
Loading…
Reference in New Issue
Block a user