[fenix] Closes https://github.com/mozilla-mobile/fenix/issues/4012 - Animate quick settings (https://github.com/mozilla-mobile/fenix/pull/4047)
parent
3dbee6b52c
commit
0fc3134f6c
@ -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)
|
||||
)
|
||||
}
|
||||
}
|
@ -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" />
|
@ -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" />
|
@ -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" />
|
@ -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" />
|
@ -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>
|
@ -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>
|
@ -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>
|
@ -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>
|
@ -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>
|
@ -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>
|
@ -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>
|
@ -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>
|
@ -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>
|
@ -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>
|
@ -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>
|
@ -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>
|
@ -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>
|
@ -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>
|
@ -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>
|
@ -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>
|
@ -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>
|
@ -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>
|
Loading…
Reference in New Issue