import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
+import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.net.ConnectivityManager;
import android.os.BatteryManager;
@ColorInt
public static int getColorAccent(Context context) {
- TypedArray ta = context.obtainStyledAttributes(new int[]{android.R.attr.colorAccent});
- @ColorInt int colorAccent = ta.getColor(0, 0);
- ta.recycle();
- return colorAccent;
+ return getColorAttr(context, android.R.attr.colorAccent);
}
@ColorInt
return list.getDefaultColor();
}
+ @ColorInt
+ public static int getDisabled(Context context, int inputColor) {
+ return applyAlphaAttr(context, android.R.attr.disabledAlpha, inputColor);
+ }
+
+ @ColorInt
+ public static int applyAlphaAttr(Context context, int attr, int inputColor) {
+ TypedArray ta = context.obtainStyledAttributes(new int[]{attr});
+ float alpha = ta.getFloat(0, 0);
+ ta.recycle();
+ alpha *= Color.alpha(inputColor);
+ return Color.argb((int) (alpha), Color.red(inputColor), Color.green(inputColor),
+ Color.blue(inputColor));
+ }
+
+ @ColorInt
+ public static int getColorAttr(Context context, int attr) {
+ TypedArray ta = context.obtainStyledAttributes(new int[]{attr});
+ @ColorInt int colorAccent = ta.getColor(0, 0);
+ ta.recycle();
+ return colorAccent;
+ }
+
/**
* Determine whether a package is a "system package", in which case certain things (like
* disabling notifications or disabling the package altogether) should be disallowed.
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2015 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<set
- xmlns:android="http://schemas.android.com/apk/res/android" >
- <objectAnimator
- android:duration="350"
- android:propertyName="alpha"
- android:valueFrom="1.0"
- android:valueTo="0.3"
- android:valueType="floatType"
- android:interpolator="@android:interpolator/linear" />
-</set>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2014 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<set xmlns:android="http://schemas.android.com/apk/res/android" >
- <objectAnimator
- android:duration="350"
- android:propertyName="alpha"
- android:valueFrom="1.0"
- android:valueTo="0.3"
- android:interpolator="@android:interpolator/fast_out_slow_in" />
-</set>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2014 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<set xmlns:android="http://schemas.android.com/apk/res/android" >
- <objectAnimator
- android:duration="350"
- android:propertyName="alpha"
- android:valueFrom="0.3"
- android:valueTo="1.0"
- android:interpolator="@android:interpolator/fast_out_slow_in" />
-</set>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2014 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<set xmlns:android="http://schemas.android.com/apk/res/android" >
- <objectAnimator
- android:duration="350"
- android:propertyName="alpha"
- android:valueFrom="1.0"
- android:valueTo="0.3"
- android:interpolator="@android:interpolator/fast_out_slow_in" />
-</set>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2014 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<set xmlns:android="http://schemas.android.com/apk/res/android" >
- <objectAnimator
- android:duration="350"
- android:propertyName="alpha"
- android:valueFrom="0.3"
- android:valueTo="1.0"
- android:interpolator="@android:interpolator/fast_out_slow_in" />
-</set>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2014 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<set xmlns:android="http://schemas.android.com/apk/res/android" >
- <objectAnimator
- android:duration="350"
- android:propertyName="alpha"
- android:valueFrom="1.0"
- android:valueTo="0.3"
- android:interpolator="@android:interpolator/fast_out_slow_in" />
-</set>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2014 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<set xmlns:android="http://schemas.android.com/apk/res/android" >
- <objectAnimator
- android:duration="350"
- android:propertyName="alpha"
- android:valueFrom="0.3"
- android:valueTo="1.0"
- android:interpolator="@android:interpolator/fast_out_slow_in" />
-</set>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2014 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<set xmlns:android="http://schemas.android.com/apk/res/android" >
- <objectAnimator
- android:duration="350"
- android:propertyName="alpha"
- android:valueFrom="1.0"
- android:valueTo="0.3"
- android:interpolator="@android:interpolator/fast_out_slow_in" />
-</set>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2014 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<set xmlns:android="http://schemas.android.com/apk/res/android" >
- <objectAnimator
- android:duration="350"
- android:propertyName="alpha"
- android:valueFrom="0.3"
- android:valueTo="1.0"
- android:interpolator="@android:interpolator/fast_out_slow_in" />
-</set>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2014 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<set xmlns:android="http://schemas.android.com/apk/res/android" >
- <objectAnimator
- android:duration="350"
- android:propertyName="alpha"
- android:valueFrom="1.0"
- android:valueTo="0.3"
- android:interpolator="@android:interpolator/fast_out_slow_in" />
-</set>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2014 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<set xmlns:android="http://schemas.android.com/apk/res/android" >
- <objectAnimator
- android:duration="350"
- android:propertyName="alpha"
- android:valueFrom="0.3"
- android:valueTo="1.0"
- android:interpolator="@android:interpolator/fast_out_slow_in" />
-</set>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2015 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<set xmlns:android="http://schemas.android.com/apk/res/android" >
- <objectAnimator
- android:duration="350"
- android:propertyName="alpha"
- android:valueFrom="1.0"
- android:valueTo="0.3"
- android:interpolator="@android:interpolator/fast_out_slow_in" />
-</set>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2015 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<set xmlns:android="http://schemas.android.com/apk/res/android" >
- <objectAnimator
- android:duration="350"
- android:propertyName="alpha"
- android:valueFrom="0.3"
- android:valueTo="1.0"
- android:interpolator="@android:interpolator/fast_out_slow_in" />
-</set>
android:height="16dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0"
- android:tint="?android:attr/colorControlNormal">
+ android:tint="?android:attr/textColorTertiary">
<path
- android:fillColor="#64ffffff"
+ android:fillColor="#FFFFFFFF"
android:pathData="M22.0,5.7l-4.6,-3.9l-1.3,1.5l4.6,3.9L22.0,5.7zM7.9,3.4L6.6,1.9L2.0,5.7l1.3,1.5L7.9,3.4zM12.5,8.0L11.0,8.0l0.0,6.0l4.7,2.9l0.8,-1.2l-4.0,-2.4L12.5,8.0zM12.0,4.0c-5.0,0.0 -9.0,4.0 -9.0,9.0c0.0,5.0 4.0,9.0 9.0,9.0s9.0,-4.0 9.0,-9.0C21.0,8.0 17.0,4.0 12.0,4.0zM12.0,20.0c-3.9,0.0 -7.0,-3.1 -7.0,-7.0c0.0,-3.9 3.1,-7.0 7.0,-7.0c3.9,0.0 7.0,3.1 7.0,7.0C19.0,16.9 15.9,20.0 12.0,20.0z"/>
</vector>
<target
android:name="bar01_0"
android:animation="@anim/ic_dnd_disable_bar01_0_animation" />
- <target
- android:name="ic_dnd_disable"
- android:animation="@anim/ic_dnd_disable_alpha_animation" />
</animated-vector>
<target
android:name="outer_ring_merged"
android:animation="@anim/ic_dnd_total_silence_disable_outer_ring_merged_animation" />
- <target
- android:name="ic_dnd_total_silence_disable"
- android:animation="@anim/ic_dnd_total_silence_disable_alpha_animation" />
</animated-vector>
<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/ic_hotspot_disable" >
<target
- android:name="root"
- android:animation="@anim/ic_hotspot_disable_animation_root" />
- <target
android:name="mask"
android:animation="@anim/ic_hotspot_disable_animation_mask" />
<target
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:name="root"
- android:alpha="0.3"
android:height="48dp"
android:width="48dp"
android:viewportHeight="48"
- android:viewportWidth="48"
- android:tint="?android:attr/colorControlNormal" >
+ android:viewportWidth="48" >
<group
android:name="ic_hotspot"
android:translateX="23.97354"
<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/ic_hotspot_enable" >
<target
- android:name="root"
- android:animation="@anim/ic_hotspot_enable_animation_root" />
- <target
android:name="mask"
android:animation="@anim/ic_hotspot_enable_animation_mask" />
<target
android:height="48dp"
android:width="48dp"
android:viewportHeight="48"
- android:viewportWidth="48"
- android:alpha="0.25"
- android:tint="?android:attr/colorControlNormal" >
+ android:viewportWidth="48" >
<group
android:name="ic_hotspot"
android:translateX="23.97354"
<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/ic_invert_colors_disable" >
<target
- android:name="root"
- android:animation="@anim/ic_invert_colors_disable_animation_root" />
- <target
android:name="mask"
android:animation="@anim/ic_invert_colors_disable_animation_mask" />
<target
<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/ic_invert_colors_enable" >
<target
- android:name="root"
- android:animation="@anim/ic_invert_colors_enable_animation_root" />
- <target
android:name="mask"
android:animation="@anim/ic_invert_colors_enable_animation_mask" />
<target
--- /dev/null
+<!--
+ Copyright (C) 2016 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:autoMirrored="true"
+ android:width="32.0dp"
+ android:height="32.0dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0"
+ android:tint="?android:attr/colorControlNormal">
+ <path
+ android:pathData="M5,3
+ l3.5,0 l0,-1.5 l7,0 l0,1.5 l3.5,0 l0,19.5 l-14,0z
+ M10.5,8.5 l0,3 l-3,0 l0,3 l3,0 l0,3 l3,0 l0,-3 l3,0 l0,-3 l-3,0 l0,-3 z"
+ android:fillColor="#FFFFFF"/>
+</vector>
android:tint="?android:attr/colorControlNormal">
<path
- android:fillColor="#4DFFFFFF"
+ android:fillColor="#FFFFFFFF"
android:pathData="M26.0,11.8l3.8,3.8l-3.2,3.2l2.8,2.8l6.0,-6.0L24.0,4.2l-2.0,0.0l0.0,10.1l4.0,4.0L26.0,11.8zM10.8,8.2L8.0,11.0l13.2,13.2L10.0,35.3l2.8,2.8L22.0,29.0l0.0,15.2l2.0,0.0l8.6,-8.6l4.6,4.6l2.8,-2.8L10.8,8.2zM26.0,36.5L26.0,29.0l3.8,3.8L26.0,36.5z"/>
</vector>
android:width="64dp"
android:height="64dp"
android:viewportWidth="48.0"
- android:viewportHeight="48.0"
- android:tint="?android:attr/colorControlNormal">
+ android:viewportHeight="48.0">
<path
- android:fillColor="#4DFFFFFF"
+ android:fillColor="#FFFFFFFF"
android:pathData="M42.0,6.0L6.0,6.0c-2.2,0.0 -4.0,1.8 -4.0,4.0l0.0,6.0l4.0,0.0l0.0,-6.0l36.0,0.0l0.0,28.0L28.0,38.0l0.0,4.0l14.0,0.0c2.2,0.0 4.0,-1.8 4.0,-4.0L46.0,10.0C46.0,7.8 44.2,6.0 42.0,6.0zM2.0,36.0l0.0,6.0l6.0,0.0C8.0,38.7 5.3,36.0 2.0,36.0zM2.0,28.0l0.0,4.0c5.5,0.0 10.0,4.5 10.0,10.0l4.0,0.0C16.0,34.3 9.7,28.0 2.0,28.0zM2.0,20.0l0.0,4.0c9.9,0.0 18.0,8.1 18.0,18.0l4.0,0.0C24.0,29.8 14.1,20.0 2.0,20.0z"/>
</vector>
android:width="64dp"
android:height="64dp"
android:viewportWidth="48.0"
- android:viewportHeight="48.0"
- android:tint="?android:attr/colorControlNormal">
+ android:viewportHeight="48.0">
<path
android:fillColor="#FFFFFFFF"
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="64dp"
- android:height="64dp"
+ android:width="40dp"
+ android:height="40dp"
android:viewportWidth="2.2"
android:viewportHeight="2.2">
<path
- android:strokeColor="#4DFFFFFF"
- android:strokeWidth=".05"
+ android:fillColor="#FFFFFFFF"
android:pathData="M.1,1.1
c0,.55 .45,1 1,1
c.55,0 1,-.45 1,-1
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:autoMirrored="true"
- android:width="32.0dp"
- android:height="32.0dp"
- android:viewportWidth="40.0"
- android:viewportHeight="40.0">
+ android:width="17dp"
+ android:height="17.0dp"
+ android:viewportWidth="20.0"
+ android:viewportHeight="20.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M19.0,6.41L17.59,5.0 12.0,10.59 6.41,5.0 5.0,6.41 10.59,12.0 5.0,17.59 6.41,19.0 12.0,13.41 17.59,19.0 19.0,17.59 13.41,12.0z"/>
android:height="64dp"
android:viewportHeight="24.0"
android:viewportWidth="24.0"
- android:alpha=".3"
- android:width="64dp"
- android:tint="?android:attr/colorControlNormal" >
+ android:width="64dp" >
<path
android:fillColor="#FFFFFFFF"
android:width="64dp"
android:height="64dp"
android:viewportWidth="48.0"
- android:viewportHeight="48.0"
- android:tint="?android:attr/colorControlNormal">
+ android:viewportHeight="48.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M24.0,4.0C12.95,4.0 4.0,12.95 4.0,24.0s8.95,20.0 20.0,20.0 20.0,-8.95 20.0,-20.0S35.05,4.0 24.0,4.0zm10.0,22.0L14.0,26.0l0.0,-4.0l20.0,0.0l0.0,4.0z"/>
android:width="64dp"
android:height="64dp"
android:viewportWidth="24.0"
- android:viewportHeight="24.0"
- android:tint="?android:attr/colorControlNormal">
+ android:viewportHeight="24.0">
<path
android:fillColor="#FFFFFFFF"
android:height="24.0dp"
android:viewportHeight="48.0"
android:viewportWidth="48.0"
- android:width="24.0dp"
- android:tint="?android:attr/colorControlNormal" >
+ android:width="24.0dp" >
<path
android:fillColor="#FFFFFFFF"
android:width="64dp"
android:height="64dp"
android:viewportWidth="24"
- android:viewportHeight="24"
- android:alpha="0.3"
- android:tint="?android:attr/colorControlNormal">
+ android:viewportHeight="24">
<path
- android:fillColor="#FFFFFF"
+ android:fillColor="#FFF"
android:pathData="M6,12c0,5.5,4.5,10,10,10c1,0,2-0.2,3-0.5c-4.1-1.3-7-5.1-7-9.5s2.9-8.3,7-9.5C18.1,2.2,17.1,2,16,2C10.5,2,6,6.5,6,12z" />
</vector>
android:width="64dp"
android:height="64dp"
android:viewportWidth="24"
- android:viewportHeight="24"
- android:tint="?android:attr/colorControlNormal">
+ android:viewportHeight="24">
<path
- android:fillColor="#FFFFFF"
+ android:fillColor="#FFF"
android:pathData="M6,12c0,5.5,4.5,10,10,10c1,0,2-0.2,3-0.5c-4.1-1.3-7-5.1-7-9.5s2.9-8.3,7-9.5C18.1,2.2,17.1,2,16,2C10.5,2,6,6.5,6,12z" />
</vector>
android:width="32dp"
android:height="32dp"
android:viewportWidth="24.0"
- android:viewportHeight="24.0"
- android:tint="?android:attr/colorControlNormal">
+ android:viewportHeight="24.0">
<path
- android:fillColor="#4DFFFFFF"
+ android:fillColor="#FFFFFFFF"
android:pathData="M19.0,5.0c0.0,-1.1 -0.9,-2.0 -2.0,-2.0l-7.0,0.0L7.7,5.3L19.0,16.7L19.0,5.0zM3.7,3.9L2.4,5.2L5.0,7.8L5.0,19.0c0.0,1.1 0.9,2.0 2.0,2.0l10.0,0.0c0.4,0.0 0.7,-0.1 1.0,-0.3l1.9,1.9l1.3,-1.3L3.7,3.9z"/>
</vector>
android:height="24.0dp"
android:viewportHeight="48.0"
android:viewportWidth="48.0"
- android:width="24.0dp"
- android:tint="?android:attr/colorControlNormal" >
+ android:width="24.0dp" >
<path
android:fillColor="#FFFFFFFF"
android:width="32.0dp"
android:height="32.0dp"
android:viewportWidth="24.0"
- android:viewportHeight="24.0"
- android:tint="?android:attr/colorControlNormal">
+ android:viewportHeight="24.0">
<path
android:pathData="M14.1,14.1l7.9,0.0 0.0,-11.5 -20.0,20.0 12.1,0.0z"
android:fillAlpha="0.3"
android:width="32.0dp"
android:height="32.0dp"
android:viewportWidth="24.0"
- android:viewportHeight="24.0"
- android:tint="?android:attr/colorControlNormal">
+ android:viewportHeight="24.0">
<path
android:pathData="M10.0,14.6l-8.0,8.0l8.0,0.0l0,-8z"
android:fillColor="#FFFFFF"/>
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="16.0dp"
+ android:width="32.0dp"
android:height="32dp"
android:viewportWidth="12.0"
- android:viewportHeight="24.0"
- android:tint="?android:attr/colorControlNormal">
+ android:viewportHeight="12.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M3.500000,11.000000L1.800000,11.000000L1.800000,4.400000L0.200000,5.100000L0.200000,3.700000l3.100000,-1.300000l0.200000,0.000000L3.500000,11.000000z"/>
android:width="32.0dp"
android:height="32.0dp"
android:viewportWidth="24.0"
- android:viewportHeight="24.0"
- android:tint="?android:attr/colorControlNormal">
+ android:viewportHeight="24.0">
<path
android:pathData="M14.0,10.6l-12.0,12.0l12.0,0.0L14.0,10.6z"
android:fillColor="#FFFFFF"/>
android:width="32.0dp"
android:height="32.0dp"
android:viewportWidth="24.0"
- android:viewportHeight="24.0"
- android:tint="?android:attr/colorControlNormal">
+ android:viewportHeight="24.0">
<path
android:pathData="M14.1,14.1l7.9,0.0 0.0,-11.5 -20.0,20.0 12.1,0.0z"
android:fillAlpha="0.3"
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="17.333334dp"
+ android:width="32dp"
android:height="32dp"
android:viewportWidth="13.0"
- android:viewportHeight="24.0"
- android:tint="?android:attr/colorControlNormal">
+ android:viewportHeight="13.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M2.000000,6.000000l0.800000,0.000000c0.300000,0.000000 0.500000,-0.100000 0.700000,-0.300000s0.200000,-0.500000 0.200000,-0.900000c0.000000,-0.300000 -0.100000,-0.600000 -0.200000,-0.800000S3.200000,3.700000 2.900000,3.700000C2.700000,3.700000 2.500000,3.800000 2.300000,4.000000S2.100000,4.400000 2.100000,4.700000L0.500000,4.700000C0.500000,4.000000 0.700000,3.400000 1.100000,3.000000s1.000000,-0.600000 1.700000,-0.600000c0.800000,0.000000 1.400000,0.200000 1.900000,0.600000s0.700000,1.000000 0.700000,1.800000c0.000000,0.400000 -0.100000,0.700000 -0.300000,1.100000S4.600000,6.500000 4.300000,6.600000C4.700000,6.800000 5.000000,7.100000 5.200000,7.400000s0.300000,0.700000 0.300000,1.200000c0.000000,0.800000 -0.200000,1.400000 -0.700000,1.800000s-1.100000,0.700000 -1.900000,0.700000c-0.700000,0.000000 -1.300000,-0.200000 -1.800000,-0.600000s-0.700000,-1.000000 -0.700000,-1.800000L2.000000,8.700000C2.000000,9.000000 2.100000,9.300000 2.300000,9.500000s0.400000,0.300000 0.600000,0.300000c0.300000,0.000000 0.500000,-0.100000 0.700000,-0.300000S3.900000,9.000000 3.900000,8.600000c0.000000,-0.500000 -0.100000,-0.800000 -0.300000,-1.000000S3.200000,7.300000 2.800000,7.300000L2.000000,7.300000L2.000000,6.000000z"/>
android:width="32.0dp"
android:height="32.0dp"
android:viewportWidth="24.0"
- android:viewportHeight="24.0"
- android:tint="?android:attr/colorControlNormal">
+ android:viewportHeight="24.0">
<path
android:pathData="M14.1,14.1l7.9,0.0 0.0,-11.5 -20.0,20.0 12.1,0.0z"
android:fillColor="#FFFFFF"/>
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="16.0dp"
+ android:width="32.0dp"
android:height="32dp"
android:viewportWidth="12.0"
- android:viewportHeight="24.0"
- android:tint="?android:attr/colorControlNormal">
+ android:viewportHeight="12.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M4.600000,7.800000l0.700000,0.000000l0.000000,1.300000L4.600000,9.100000L4.600000,11.000000L3.000000,11.000000L3.000000,9.200000L0.100000,9.200000L0.000000,8.100000L3.000000,2.500000l1.700000,0.000000L4.700000,7.800000zM1.600000,7.800000L3.000000,7.800000l0.000000,-3.000000L2.900000,5.000000L1.600000,7.800000z"/>
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="24.0dp"
- android:height="24.0dp"
+ android:width="32.0dp"
+ android:height="32.0dp"
android:viewportWidth="24.0"
- android:viewportHeight="24.0"
- android:tint="?android:attr/colorControlNormal">
+ android:viewportHeight="24.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M4.6,7.8l0.7,0.0l0.0,1.3L4.6,9.1L4.6,11.0L3.0,11.0L3.0,9.2L0.1,9.2L0.0,8.2l3.0,-5.7l1.7,0.0L4.6,7.8L4.6,7.8zM1.7,7.8L3.0,7.8l0.0,-3.0L2.9,5.0L1.7,7.8z"/>
android:width="32dp"
android:height="32dp"
android:viewportWidth="24.0"
- android:viewportHeight="24.0"
- android:tint="?android:attr/colorControlNormal">
+ android:viewportHeight="24.0">
<path
android:name="dot1"
android:fillColor="#FFFFFFFF"
android:width="32dp"
android:height="32dp"
android:viewportWidth="24.0"
- android:viewportHeight="24.0"
- android:tint="?android:attr/colorControlNormal">
+ android:viewportHeight="24.0">
<path
- android:fillColor="#4DFFFFFF"
+ android:fillColor="#FFFFFFFF"
android:pathData="M21.799999,22.299999l-1.199999,-1.299999 0.000000,0.000000 -9.600000,-10.000000 0.000000,0.000000 -6.400000,-6.700000 -1.300000,1.300000 6.400000,6.700000 -8.700000,8.700000 16.900000,0.000000 2.600000,2.700001z"/>
<path
- android:fillColor="#4DFFFFFF"
+ android:fillColor="#FFFFFFFF"
android:pathData="M21.000000,1.000000l-8.600000,8.600000 8.600000,9.100000z"/>
</vector>
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="6.6666665dp"
+ android:width="32dp"
android:height="32dp"
android:viewportWidth="5.0"
- android:viewportHeight="24.0"
- android:tint="?android:attr/colorControlNormal">
+ android:viewportHeight="5.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M4.400000,7.300000L1.700000,7.300000l0.000000,2.400000l3.300000,0.000000L5.000000,11.000000L0.000000,11.000000L0.000000,2.500000l4.900000,0.000000l0.000000,1.300000L1.700000,3.800000l0.000000,2.100000l2.800000,0.000000L4.500000,7.300000z"/>
android:width="32dp"
android:height="32dp"
android:viewportWidth="24.0"
- android:viewportHeight="24.0"
- android:tint="?android:attr/colorControlNormal">
+ android:viewportHeight="24.0">
<path
android:fillColor="#4DFFFFFF"
android:pathData="M2.000000,22.000000l20.000000,0.000000 0.000000,-20.000000z"/>
android:width="32dp"
android:height="32dp"
android:viewportWidth="24.0"
- android:viewportHeight="24.0"
- android:tint="?android:attr/colorControlNormal">
+ android:viewportHeight="24.0">
<path
android:fillColor="#4DFFFFFF"
android:pathData="M2.0,22.0l20.0,0.0 0.0,-20.0z"/>
android:width="32dp"
android:height="32dp"
android:viewportWidth="24.0"
- android:viewportHeight="24.0"
- android:tint="?android:attr/colorControlNormal">
+ android:viewportHeight="24.0">
<path
android:fillColor="#4DFFFFFF"
android:pathData="M2.000000,22.000000l20.000000,0.000000 0.000000,-20.000000z"/>
android:width="32dp"
android:height="32dp"
android:viewportWidth="24.0"
- android:viewportHeight="24.0"
- android:tint="?android:attr/colorControlNormal">
+ android:viewportHeight="24.0">
<path
android:fillColor="#4DFFFFFF"
android:pathData="M2.000000,22.000000l20.000000,0.000000 0.000000,-20.000000z"/>
android:width="32dp"
android:height="32dp"
android:viewportWidth="24.0"
- android:viewportHeight="24.0"
- android:tint="?android:attr/colorControlNormal">
+ android:viewportHeight="24.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M2.000000,22.000000l20.000000,0.000000 0.000000,-20.000000z"/>
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="9.333333dp"
+ android:width="32dp"
android:height="32dp"
android:viewportWidth="7.0"
- android:viewportHeight="24.0"
- android:tint="?android:attr/colorControlNormal">
+ android:viewportHeight="7.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M6.500000,9.900000c-0.200000,0.400000 -0.600000,0.700000 -1.000000,0.900000s-1.000000,0.400000 -1.800000,0.400000c-0.900000,0.000000 -1.700000,-0.300000 -2.200000,-0.800000S0.700000,9.000000 0.700000,7.900000L0.700000,5.600000c0.000000,-1.100000 0.300000,-1.900000 0.800000,-2.400000s1.200000,-0.800000 2.100000,-0.800000c1.000000,0.000000 1.700000,0.200000 2.100000,0.700000s0.700000,1.200000 0.700000,2.100000L4.700000,5.200000c0.000000,-0.500000 -0.100000,-0.900000 -0.200000,-1.100000S4.000000,3.700000 3.600000,3.700000c-0.400000,0.000000 -0.700000,0.200000 -0.900000,0.500000S2.300000,5.000000 2.300000,5.600000l0.000000,2.300000c0.000000,0.700000 0.100000,1.100000 0.300000,1.400000s0.600000,0.500000 1.000000,0.500000c0.300000,0.000000 0.600000,0.000000 0.700000,-0.100000s0.300000,-0.200000 0.400000,-0.300000L4.700000,7.800000L3.500000,7.800000L3.500000,6.600000l2.900000,0.000000L6.400000,9.900000z"/>
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="8.0dp"
+ android:width="32.0dp"
android:height="32dp"
android:viewportWidth="6.0"
- android:viewportHeight="24.0"
- android:tint="?android:attr/colorControlNormal">
+ android:viewportHeight="6.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M6.000000,11.000000L4.400000,11.000000L4.400000,7.500000L1.700000,7.500000L1.700000,11.000000L0.000000,11.000000L0.000000,2.500000l1.700000,0.000000l0.000000,3.700000l2.700000,0.000000L4.400000,2.500000L6.000000,2.500000L6.000000,11.000000z"/>
android:width="6.0dp"
android:height="32dp"
android:viewportWidth="6.0"
- android:viewportHeight="24.0"
- android:tint="?android:attr/colorControlNormal">
+ android:viewportHeight="24.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M6.000000,15.700000l-3.000000,5.599999 -3.000000,-5.599999z"/>
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="17.333334dp"
+ android:width="32dp"
android:height="32dp"
android:viewportWidth="13.0"
- android:viewportHeight="24.0"
- android:tint="?android:attr/colorControlNormal">
+ android:viewportHeight="13.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M2.000000,9.700000l2.000000,0.000000L4.000000,11.000000L0.300000,11.000000L0.300000,2.500000L2.000000,2.500000L2.000000,9.700000z"/>
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="24.0dp"
- android:height="24.0dp"
+ android:width="32.0dp"
+ android:height="32.0dp"
android:viewportWidth="24.0"
- android:viewportHeight="24.0"
- android:tint="?android:attr/colorControlNormal">
+ android:viewportHeight="24.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M2.0,9.7l2.0,0.0L4.0,11.0L0.4,11.0L0.4,2.5L2.0,2.5L2.0,9.7z"/>
android:width="32dp"
android:height="32dp"
android:viewportWidth="24.0"
- android:viewportHeight="24.0"
- android:tint="?android:attr/colorControlNormal">
+ android:viewportHeight="24.0">
<path
- android:fillColor="#4DFFFFFF"
+ android:fillColor="#FFFFFFFF"
android:pathData="M2.000000,22.000000l20.000000,0.000000L22.000000,2.000000L2.000000,22.000000zM20.000000,20.000000L6.800000,20.000000L20.000000,6.800000L20.000000,20.000000z"/>
</vector>
android:width="6.0dp"
android:height="32dp"
android:viewportWidth="6.0"
- android:viewportHeight="24.0"
- android:tint="?android:attr/colorControlNormal">
+ android:viewportHeight="24.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M0.000000,13.700000l3.000000,-5.700000 3.000000,5.700000z"/>
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="8.0dp"
+ android:width="32.0dp"
android:height="32dp"
android:viewportWidth="6.0"
- android:viewportHeight="24.0"
- android:tint="?android:attr/colorControlNormal">
+ android:viewportHeight="6.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M2.800000,7.900000l-1.000000,0.000000L1.800000,11.000000L0.200000,11.000000L0.200000,2.500000l2.700000,0.000000c0.900000,0.000000 1.500000,0.200000 2.000000,0.700000s0.700000,1.100000 0.700000,1.900000c0.000000,0.600000 -0.100000,1.100000 -0.300000,1.500000S4.800000,7.200000 4.400000,7.400000l1.500000,3.500000L5.900000,11.000000L4.100000,11.000000L2.800000,7.900000zM1.800000,6.500000l1.100000,0.000000c0.400000,0.000000 0.600000,-0.100000 0.800000,-0.400000S4.000000,5.600000 4.000000,5.200000c0.000000,-0.400000 -0.100000,-0.800000 -0.300000,-1.000000S3.300000,3.800000 2.900000,3.800000L1.800000,3.800000L1.800000,6.500000z"/>
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
- android:fillColor="#4DFFFFFF"
+ android:fillColor="#FFFFFFFF"
android:pathData="M12.700000,10.000000c-0.800000,-2.300000 -3.000000,-4.000000 -5.700000,-4.000000c-3.300000,0.000000 -6.000000,2.700000 -6.000000,6.000000s2.700000,6.000000 6.000000,6.000000c2.600000,0.000000 4.800000,-1.700000 5.700000,-4.000000L17.000000,14.000000l0.000000,4.000000l4.000000,0.000000l0.000000,-4.000000l2.000000,0.000000l0.000000,-4.000000L12.700000,10.000000zM7.000000,14.000000c-1.100000,0.000000 -2.000000,-0.900000 -2.000000,-2.000000c0.000000,-1.100000 0.900000,-2.000000 2.000000,-2.000000s2.000000,0.900000 2.000000,2.000000C9.000000,13.100000 8.100000,14.000000 7.000000,14.000000z"/>
</vector>
android:width="24.0dp"
android:height="24.0dp"
android:viewportWidth="24.0"
- android:viewportHeight="24.0"
- android:tint="?android:attr/colorControlNormal">
+ android:viewportHeight="24.0">
<path
android:pathData="M13.8,12.2l5.7,0.0L23.6,7.0C23.2,6.7 18.7,3.0 12.0,3.0C5.3,3.0 0.8,6.7 0.4,7.0L12.0,21.5l0.0,0.0l0.0,0.0l1.8,-2.2L13.8,12.2z"
android:fillAlpha="0.3"
android:width="24.0dp"
android:height="24.0dp"
android:viewportWidth="24.0"
- android:viewportHeight="24.0"
- android:tint="?android:attr/colorControlNormal">
+ android:viewportHeight="24.0">
<path
android:pathData="M13.8,13.2c-0.1,0.0 -0.3,-0.1 -0.4,-0.1c-0.1,0.0 -0.3,0.0 -0.4,-0.1c-0.3,0.0 -0.6,-0.1 -0.9,-0.1c0.0,0.0 0.0,0.0 -0.1,0.0c0.0,0.0 0.0,0.0 0.0,0.0s0.0,0.0 0.0,0.0c0.0,0.0 0.0,0.0 -0.1,0.0c-0.3,0.0 -0.6,0.0 -0.9,0.1c-0.1,0.0 -0.3,0.0 -0.4,0.1c-0.2,0.0 -0.3,0.1 -0.5,0.1c-0.2,0.0 -0.3,0.1 -0.5,0.1c-0.1,0.0 -0.1,0.0 -0.2,0.1c-1.6,0.5 -2.7,1.3 -2.8,1.5l5.3,6.6l0.0,0.0l0.0,0.0l0.0,0.0l0.0,0.0l1.8,-2.2L13.700002,13.2z"
android:fillColor="#FFFFFF"/>
android:width="24.0dp"
android:height="24.0dp"
android:viewportWidth="24.0"
- android:viewportHeight="24.0"
- android:tint="?android:attr/colorControlNormal">
+ android:viewportHeight="24.0">
<path
android:pathData="M13.8,12.2l4.9,0.0c-1.0,-0.7 -3.4,-2.2 -6.7,-2.2c-4.1,0.0 -6.9,2.2 -7.2,2.5l7.2,9.0l0.0,0.0l0.0,0.0l1.8,-2.2L13.800001,12.2z"
android:fillColor="#FFFFFF"/>
android:width="24.0dp"
android:height="24.0dp"
android:viewportWidth="24.0"
- android:viewportHeight="24.0"
- android:tint="?android:attr/colorControlNormal">
+ android:viewportHeight="24.0">
<path
android:pathData="M13.8,12.2l5.7,0.0l1.0,-1.2C20.0,10.6 16.8,8.0 12.0,8.0s-8.0,2.6 -8.5,3.0L12.0,21.5l0.0,0.0l0.0,0.0l1.8,-2.2L13.8,12.2z"
android:fillColor="#FFFFFF"/>
android:width="24.0dp"
android:height="24.0dp"
android:viewportWidth="24.0"
- android:viewportHeight="24.0"
- android:tint="?android:attr/colorControlNormal">
+ android:viewportHeight="24.0">
<path
android:pathData="M13.8,12.2l5.7,0.0L23.6,7.0C23.2,6.7 18.7,3.0 12.0,3.0C5.3,3.0 0.8,6.7 0.4,7.0L12.0,21.5l0.0,0.0l0.0,0.0l1.8,-2.2L13.8,12.2z"
android:fillColor="#FFFFFF"/>
android:width="32.0dp"
android:height="29.5dp"
android:viewportWidth="26.0"
- android:viewportHeight="24.0"
- android:tint="?android:attr/colorControlNormal">
+ android:viewportHeight="24.0">
<path
- android:fillColor="#4DFFFFFF"
+ android:fillColor="#FFFFFFFF"
android:pathData="M17.500000,16.500000L5.800000,3.400000c0.000000,0.000000 0.000000,0.000000 0.000000,0.000000l-2.700000,-3.000000L1.600000,1.800000l2.200000,2.500000c-2.000000,1.000000 -3.200000,2.000000 -3.400000,2.200000L13.000000,22.000000l0.000000,0.000000l0.000000,0.000000l0.000000,0.000000l0.000000,0.000000l3.200000,-3.900000l2.400000,2.700000l1.500000,-1.400000L17.500000,16.500000L17.500000,16.500000z"/>
<path
- android:fillColor="#4DFFFFFF"
+ android:fillColor="#FFFFFFFF"
android:pathData="M25.600000,6.500000C25.100000,6.100000 20.299999,2.100000 13.000000,2.100000c-1.900000,0.000000 -3.600000,0.300000 -5.200000,0.700000L18.700001,15.000000L25.600000,6.500000z"/>
</vector>
android:width="26.0dp"
android:height="24.0dp"
android:viewportWidth="26.0"
- android:viewportHeight="24.0"
- android:tint="?android:attr/colorControlNormal">
+ android:viewportHeight="24.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M21.0,8.5
android:width="32.0dp"
android:height="29.5dp"
android:viewportWidth="26.0"
- android:viewportHeight="24.0"
- android:tint="?android:attr/colorControlNormal">
+ android:viewportHeight="24.0">
<path
android:fillColor="#4DFFFFFF"
android:pathData="M13.000000,22.000000L25.600000,6.500000C25.100000,6.100000 20.299999,2.100000 13.000000,2.100000S0.900000,6.100000 0.400000,6.500000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000z"/>
android:width="32.0dp"
android:height="29.5dp"
android:viewportWidth="26.0"
- android:viewportHeight="24.0"
- android:tint="?android:attr/colorControlNormal">
+ android:viewportHeight="24.0">
<path
android:fillColor="#4DFFFFFF"
android:pathData="M13.100000,22.000000L25.600000,6.500000C25.100000,6.100000 20.299999,2.100000 13.000000,2.100000S0.900000,6.100000 0.500000,6.500000L13.100000,22.000000L13.100000,22.000000L13.100000,22.000000L13.100000,22.000000L13.100000,22.000000z"/>
android:width="32.0dp"
android:height="29.5dp"
android:viewportWidth="26.0"
- android:viewportHeight="24.0"
- android:tint="?android:attr/colorControlNormal">
+ android:viewportHeight="24.0">
<path
android:fillColor="#4DFFFFFF"
android:pathData="M13.000000,22.000000L25.600000,6.500000C25.100000,6.100000 20.299999,2.100000 13.000000,2.100000S0.900000,6.100000 0.400000,6.500000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000z"/>
android:width="32.0dp"
android:height="29.5dp"
android:viewportWidth="26.0"
- android:viewportHeight="24.0"
- android:tint="?android:attr/colorControlNormal">
+ android:viewportHeight="24.0">
<path
android:fillColor="#4DFFFFFF"
android:pathData="M13.000000,22.000000L25.600000,6.500000C25.100000,6.100000 20.299999,2.100000 13.000000,2.100000S0.900000,6.100000 0.400000,6.500000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000z"/>
android:width="32.0dp"
android:height="29.5dp"
android:viewportWidth="26.0"
- android:viewportHeight="24.0"
- android:tint="?android:attr/colorControlNormal">
+ android:viewportHeight="24.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M13.000000,22.000000L25.600000,6.500000C25.100000,6.100000 20.299999,2.100000 13.000000,2.100000S0.900000,6.100000 0.400000,6.500000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000z"/>
android:width="32.0dp"
android:height="29.5dp"
android:viewportWidth="26.0"
- android:viewportHeight="24.0"
- android:tint="?android:attr/colorControlNormal">
+ android:viewportHeight="24.0">
<path
- android:fillColor="#4DFFFFFF"
+ android:fillColor="#FFFFFFFF"
android:pathData="M13.000000,2.000000C7.700000,2.000000 3.700000,3.900000 0.400000,6.400000L13.000000,22.000000L25.600000,6.500000C22.299999,4.000000 18.299999,2.000000 13.000000,2.000000zM13.000000,18.600000L3.300000,7.000000l0.000000,0.000000l0.000000,0.000000C6.000000,5.300000 8.700000,4.000000 13.000000,4.000000s7.000000,1.400000 9.700000,3.000000l0.000000,0.000000l0.000000,0.000000L13.000000,18.600000z"/>
</vector>
android:width="20dp"
android:height="20dp"
android:viewportWidth="24.0"
- android:viewportHeight="24.0"
- android:tint="?android:attr/colorControlNormal">
+ android:viewportHeight="24.0">
<path
android:pathData="M19.4,13.0c0.0,-0.3 0.1,-0.6 0.1,-1.0s0.0,-0.7 -0.1,-1.0l2.1,-1.7c0.2,-0.2 0.2,-0.4 0.1,-0.6l-2.0,-3.5C19.5,5.1 19.3,5.0 19.0,5.1l-2.5,1.0c-0.5,-0.4 -1.1,-0.7 -1.7,-1.0l-0.4,-2.6C14.5,2.2 14.2,2.0 14.0,2.0l-4.0,0.0C9.8,2.0 9.5,2.2 9.5,2.4L9.1,5.1C8.5,5.3 8.0,5.7 7.4,6.1L5.0,5.1C4.7,5.0 4.5,5.1 4.3,5.3l-2.0,3.5C2.2,8.9 2.3,9.2 2.5,9.4L4.6,11.0c0.0,0.3 -0.1,0.6 -0.1,1.0s0.0,0.7 0.1,1.0l-2.1,1.7c-0.2,0.2 -0.2,0.4 -0.1,0.6l2.0,3.5C4.5,18.9 4.7,19.0 5.0,18.9l2.5,-1.0c0.5,0.4 1.1,0.7 1.7,1.0l0.4,2.6c0.0,0.2 0.2,0.4 0.5,0.4l4.0,0.0c0.2,0.0 0.5,-0.2 0.5,-0.4l0.4,-2.6c0.6,-0.3 1.2,-0.6 1.7,-1.0l2.5,1.0c0.2,0.1 0.5,0.0 0.6,-0.2l2.0,-3.5c0.1,-0.2 0.1,-0.5 -0.1,-0.6L19.4,13.0zM12.0,15.5c-1.9,0.0 -3.5,-1.6 -3.5,-3.5s1.6,-3.5 3.5,-3.5s3.5,1.6 3.5,3.5S13.9,15.5 12.0,15.5z"
android:fillColor="#ffffffff" />
android:height="48dp"
android:width="48dp"
android:viewportHeight="48"
- android:viewportWidth="48"
- android:tint="?android:attr/colorControlNormal" >
+ android:viewportWidth="48" >
<group
android:name="ic_signal_airplane"
android:translateX="21.9995"
<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/ic_signal_airplane_disable" >
<target
- android:name="root"
- android:animation="@anim/ic_signal_airplane_disable_animation_root" />
- <target
android:name="mask"
android:animation="@anim/ic_signal_airplane_disable_animation_mask" />
<target
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:name="root"
- android:alpha="0.3"
android:height="48dp"
android:width="48dp"
android:viewportHeight="48"
- android:viewportWidth="48"
- android:tint="?android:attr/colorControlNormal" >
+ android:viewportWidth="48" >
<group
android:name="ic_signal_airplane"
android:translateX="21.9995"
<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/ic_signal_airplane_enable" >
<target
- android:name="root"
- android:animation="@anim/ic_signal_airplane_enable_animation_root" />
- <target
android:name="ic_signal_airplane"
android:animation="@anim/ic_signal_airplane_enable_animation_ic_signal_airplane" />
<target
android:height="48dp"
android:width="48dp"
android:viewportHeight="48"
- android:viewportWidth="48"
- android:tint="?android:attr/colorControlNormal" >
+ android:viewportWidth="48" >
<group
android:name="ic_signal_flashlight"
android:translateX="21.9995"
<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/ic_signal_flashlight_disable" >
<target
- android:name="root"
- android:animation="@anim/ic_signal_flashlight_disable_animation_root" />
- <target
android:name="mask"
android:animation="@anim/ic_signal_flashlight_disable_animation_mask" />
<target
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:name="root"
- android:alpha="0.3"
android:height="48dp"
android:width="48dp"
android:viewportHeight="48"
- android:viewportWidth="48"
- android:tint="?android:attr/colorControlNormal" >
+ android:viewportWidth="48" >
<group
android:name="ic_signal_flashlight"
android:translateX="21.9995"
<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/ic_signal_flashlight_enable" >
<target
- android:name="root"
- android:animation="@anim/ic_signal_flashlight_enable_animation_root" />
- <target
android:name="mask"
android:animation="@anim/ic_signal_flashlight_enable_animation_mask" />
<target
android:height="48dp"
android:width="48dp"
android:viewportHeight="48"
- android:viewportWidth="48"
- android:tint="?android:attr/colorControlNormal" >
+ android:viewportWidth="48" >
<group
android:name="ic_signal_location"
android:translateX="21.9995"
<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/ic_signal_location_disable" >
<target
- android:name="root"
- android:animation="@anim/ic_signal_location_disable_animation_root" />
- <target
android:name="mask"
android:animation="@anim/ic_signal_location_disable_animation_mask" />
<target
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:name="root"
- android:alpha="0.3"
android:height="48dp"
android:width="48dp"
android:viewportHeight="48"
- android:viewportWidth="48"
- android:tint="?android:attr/colorControlNormal" >
+ android:viewportWidth="48" >
<group
android:name="ic_signal_location"
android:translateX="21.9995"
<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/ic_signal_location_enable" >
<target
- android:name="root"
- android:animation="@anim/ic_signal_location_enable_animation_root" />
- <target
android:name="mask"
android:animation="@anim/ic_signal_location_enable_animation_mask" />
<target
<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/ic_signal_workmode_disable" >
<target
- android:name="root"
- android:animation="@anim/ic_signal_workmode_disable_animation_root" />
- <target
android:name="mask"
android:animation="@anim/ic_signal_workmode_disable_animation_mask" />
<target
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:name="root"
- android:alpha="0.3"
android:height="42dp"
android:width="42dp"
android:viewportHeight="42"
<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/ic_signal_workmode_enable" >
<target
- android:name="root"
- android:animation="@anim/ic_signal_workmode_enable_animation_root" />
- <target
android:name="ic_signal_briefcase"
android:animation="@anim/ic_signal_workmode_enable_animation_ic_signal_briefcase" />
<target
<vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:name="minor_a_b"
- android:alpha="0.3"
android:width="16dp"
android:viewportWidth="16"
android:height="8dp"
- android:viewportHeight="8"
- android:tint="?android:attr/colorControlNormal" >
+ android:viewportHeight="8" >
<group
android:name="dot_02"
android:translateX="3.25"
<vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:name="minor_b_a"
- android:alpha="0.3"
android:width="16dp"
android:viewportWidth="16"
android:height="8dp"
- android:viewportHeight="8"
- android:tint="?android:attr/colorControlNormal" >
+ android:viewportHeight="8" >
<group
android:name="dot_02"
android:translateX="8"
<vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:name="minor_b_c"
- android:alpha="0.3"
android:width="16dp"
android:viewportWidth="16"
android:height="8dp"
- android:viewportHeight="8"
- android:tint="?android:attr/colorControlNormal" >
+ android:viewportHeight="8" >
<group
android:name="dot_02"
android:translateX="8"
<vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:name="minor_c_b"
- android:alpha="0.3"
android:width="16dp"
android:viewportWidth="16"
android:height="8dp"
- android:viewportHeight="8"
- android:tint="?android:attr/colorControlNormal" >
+ android:viewportHeight="8" >
<group
android:name="dot_02"
android:translateX="12.75"
--- /dev/null
+<!--
+Copyright (C) 2014 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24.0dp"
+ android:height="24.0dp"
+ android:viewportWidth="48.0"
+ android:viewportHeight="48.0">
+
+ <path
+ android:fillColor="#FFFFFFFF"
+ android:pathData="M14.0,20.0l10.0,10.0 10.0,-10.0z"/>
+</vector>
android:width="24.0dp"
android:height="24.0dp"
android:viewportWidth="72.0"
- android:viewportHeight="72.0">
+ android:viewportHeight="72.0"
+ android:tint="?android:attr/textColorPrimary">
<group
android:translateX="52.0"
android:translateY="42.0" >
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="27.0dp"
android:height="22.0dp"
- android:alpha="0.3"
android:viewportWidth="27.0"
android:viewportHeight="22.0">
<clip-path
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="wrap_content"
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
android:paddingStart="8dp"
android:paddingEnd="8dp"
- android:paddingBottom="16dp" />
+ android:paddingTop="8dp"
+ android:gravity="center" />
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/qs_detail_background"
- android:paddingBottom="8dp"
android:clickable="true"
- android:visibility="invisible"
- android:orientation="vertical">
+ android:orientation="vertical"
+ android:paddingBottom="8dp"
+ android:visibility="invisible">
<com.android.systemui.ResizingSpace
android:layout_width="match_parent"
android:id="@+id/qs_detail_header"
layout="@layout/qs_detail_header"
android:layout_width="match_parent"
- android:layout_height="wrap_content" />
+ android:layout_height="wrap_content"
+ />
<com.android.systemui.statusbar.AlphaOptimizedImageView
android:id="@+id/qs_detail_header_progress"
- android:src="@drawable/indeterminate_anim"
- android:alpha="0"
- android:background="@color/qs_detail_progress_track"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:scaleType="fitXY"
- android:translationY="8dp"
+ android:alpha="0"
+ android:background="@color/qs_detail_progress_track"
+ android:src="@drawable/indeterminate_anim"
/>
<com.android.systemui.qs.NonInterceptingScrollView
android:layout_height="0dp"
android:layout_weight="1"
android:fillViewport="true">
+
<FrameLayout
android:id="@android:id/content"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</com.android.systemui.qs.NonInterceptingScrollView>
- <include layout="@layout/qs_detail_buttons" />
+ <include layout="@layout/qs_detail_buttons"/>
</com.android.systemui.qs.QSDetail>
android:layout_width="@dimen/qs_detail_item_icon_size"
android:layout_height="@dimen/qs_detail_item_icon_size"
android:layout_marginStart="@dimen/qs_detail_item_icon_marginStart"
- android:layout_marginEnd="@dimen/qs_detail_item_icon_marginEnd" />
+ android:layout_marginEnd="@dimen/qs_detail_item_icon_marginEnd"
+ android:tint="?android:attr/textColorPrimary"/>
<LinearLayout
android:layout_width="0dp"
android:focusable="true"
android:scaleType="center"
android:contentDescription="@*android:string/media_route_controller_disconnect"
+ android:tint="?android:attr/textColorPrimary"
android:src="@drawable/ic_qs_cancel" />
</LinearLayout>
<ImageView
android:id="@android:id/icon"
android:layout_width="56dp"
- android:layout_height="56dp"/>
+ android:layout_height="56dp"
+ android:tint="?android:attr/textColorSecondary" />
<TextView
android:id="@android:id/title"
<?xml version="1.0" encoding="utf-8"?>
<!--
- Copyright (C) 2015 The Android Open Source Project
+ Copyright (C) 2016 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
See the License for the specific language governing permissions and
limitations under the License.
-->
-<set
- xmlns:android="http://schemas.android.com/apk/res/android" >
- <objectAnimator
- android:duration="350"
- android:propertyName="alpha"
- android:valueFrom="1.0"
- android:valueTo="0.3"
- android:valueType="floatType"
- android:interpolator="@android:interpolator/linear" />
-</set>
+<com.android.systemui.qs.PageIndicator
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/page_indicator"
+ android:layout_width="match_parent"
+ android:layout_height="48dp"
+ android:layout_gravity="center"
+ android:layout_marginTop="40dp"
+ android:layout_marginBottom="24dp"
+ android:focusable="true"
+ android:gravity="center"
+ android:importantForAccessibility="yes"
+ android:visibility="gone"/>
\ No newline at end of file
android:layout_height="48dp"
android:layout_gravity="bottom">
- <com.android.systemui.qs.PageIndicator
- android:id="@+id/page_indicator"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:gravity="center"
- android:importantForAccessibility="yes"
- android:focusable="true" />
-
</FrameLayout>
</com.android.systemui.qs.PagedTileLayout>
<com.android.systemui.qs.QSPanel
android:id="@+id/quick_settings_panel"
android:background="#0000"
- android:layout_marginTop="80dp"
+ android:layout_marginTop="52dp"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:paddingBottom="8dp" />
+ android:layout_height="wrap_content" />
<include layout="@layout/quick_status_bar_expanded_header" />
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:orientation="horizontal">
+ android:orientation="horizontal"
+ android:paddingTop="16dp">
<TextView android:id="@+id/tile_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textColor="?android:attr/textColorSecondary"
+ android:textColor="?android:attr/textColorPrimary"
android:gravity="center_horizontal"
android:minLines="2"
android:padding="0dp"
android:layout_marginLeft="@dimen/restricted_padlock_pading"
android:scaleType="centerInside"
android:visibility="gone" />
-</LinearLayout>
\ No newline at end of file
+</LinearLayout>
xmlns:systemui="http://schemas.android.com/apk/res-auto"
android:layout_height="48dp"
android:layout_width="match_parent"
+ android:layout_marginBottom="24dp"
android:paddingLeft="16dp"
android:paddingRight="16dp"
style="@style/BrightnessDialogContainer">
android:layout_width="match_parent"
android:layout_height="@dimen/status_bar_header_height"
android:layout_gravity="@integer/notification_panel_layout_gravity"
- android:clipChildren="false"
- android:clipToPadding="false"
android:baselineAligned="false"
android:clickable="false"
+ android:clipChildren="false"
+ android:clipToPadding="false"
+ android:paddingTop="0dp"
+ android:paddingEnd="0dp"
+ android:paddingStart="0dp"
>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="48dp"
- android:gravity="center"
+ android:layout_alignParentEnd="true"
android:clipChildren="false"
android:clipToPadding="false"
- android:orientation="horizontal"
- android:layout_alignParentEnd="true"
- android:layout_marginTop="4dp"
- android:layout_marginEnd="12dp">
+ android:gravity="center"
+ android:paddingEnd="4dp"
+ android:orientation="horizontal">
- <com.android.systemui.statusbar.phone.MultiUserSwitch android:id="@+id/multi_user_switch"
+ <com.android.systemui.statusbar.phone.MultiUserSwitch
+ android:id="@+id/multi_user_switch"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_alignParentEnd="true"
- android:focusable="true"
- android:background="@drawable/ripple_drawable" >
- <ImageView android:id="@+id/multi_user_avatar"
+ android:background="@drawable/ripple_drawable"
+ android:focusable="true">
+
+ <ImageView
+ android:id="@+id/multi_user_avatar"
android:layout_width="@dimen/multi_user_avatar_expanded_size"
android:layout_height="@dimen/multi_user_avatar_expanded_size"
android:layout_gravity="center"
android:id="@android:id/edit"
android:layout_width="48dp"
android:layout_height="48dp"
- android:clipToPadding="false"
+ android:background="?android:attr/selectableItemBackgroundBorderless"
android:clickable="true"
+ android:clipToPadding="false"
+ android:contentDescription="@string/accessibility_quick_settings_edit"
android:focusable="true"
+ android:padding="14dp"
android:src="@drawable/ic_mode_edit"
- android:background="?android:attr/selectableItemBackgroundBorderless"
- android:contentDescription="@string/accessibility_quick_settings_edit"
- android:padding="14dp" />
+ android:tint="?android:attr/colorForeground"/>
+
+ <LinearLayout
+ android:id="@+id/system_icons_super_container"
+ android:layout_width="wrap_content"
+ android:layout_height="@dimen/status_bar_header_height"
+ android:layout_alignWithParentIfMissing="true"
+ android:layout_toStartOf="@id/multi_user_switch"
+ android:background="@drawable/ripple_drawable">
+
+ <FrameLayout
+ android:id="@+id/system_icons_container"
+ android:layout_width="wrap_content"
+ android:layout_height="24dp"
+ android:layout_gravity="center_vertical">
+
+ <include layout="@layout/system_icons" />
+ </FrameLayout>
+
+ <TextView
+ android:id="@+id/battery_level"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:layout_marginStart="@dimen/header_battery_margin_expanded"
+ android:importantForAccessibility="noHideDescendants"
+ android:textColor="?android:attr/textColorPrimary"
+ android:textSize="@dimen/battery_level_text_size"/>
+ </LinearLayout>
<com.android.systemui.statusbar.AlphaOptimizedFrameLayout
android:id="@+id/settings_button_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/ripple_drawable"
+ android:contentDescription="@string/accessibility_quick_settings_settings"
android:src="@drawable/ic_settings_20dp"
- android:contentDescription="@string/accessibility_quick_settings_settings" />
+ android:tint="?android:attr/colorForeground"/>
+
<com.android.systemui.statusbar.AlphaOptimizedImageView
android:id="@+id/tuner_icon"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingStart="36dp"
- android:alpha="0.3"
- android:visibility="invisible"
- android:src="@drawable/tuner" />
+ android:src="@drawable/tuner"
+ android:tint="?android:attr/textColorTertiary"
+ android:visibility="invisible"/>
</com.android.systemui.statusbar.AlphaOptimizedFrameLayout>
<TextView
android:id="@+id/header_emergency_calls_only"
- android:layout_height="wrap_content"
android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
- android:paddingStart="16dp"
+ android:focusable="true"
+ android:gravity="center_vertical"
android:paddingEnd="16dp"
android:paddingTop="6dp"
- android:visibility="gone"
- android:textAppearance="@style/TextAppearance.StatusBar.Expanded.EmergencyCallsOnly"
- android:text="@*android:string/emergency_calls_only"
android:singleLine="true"
- android:gravity="center_vertical"
- android:focusable="true" />
+ android:text="@*android:string/emergency_calls_only"
+ android:textAppearance="@style/TextAppearance.StatusBar.Expanded.EmergencyCallsOnly"
+ android:visibility="gone"/>
<include
android:id="@+id/date_time_alarm_group"
layout="@layout/status_bar_alarm_group"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="16dp"
+ android:layout_marginTop="12dp"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true" />
android:id="@+id/quick_qs_panel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="52dp"
- android:layout_marginStart="12dp"
- android:layout_marginEnd="12dp"
android:layout_alignParentEnd="true"
+ android:layout_marginTop="54dp"
+ android:layout_marginBottom="24dp"
+ android:layout_alignParentTop="true"
+ android:accessibilityTraversalAfter="@+id/date_time_group"
+ android:accessibilityTraversalBefore="@id/expand_indicator"
android:clipChildren="false"
android:clipToPadding="false"
- android:importantForAccessibility="yes"
+ android:layout_marginStart="16dp"
+ android:layout_marginEnd="16dp"
android:focusable="true"
- android:accessibilityTraversalAfter="@+id/date_time_group"
- android:accessibilityTraversalBefore="@id/expand_indicator" />
+ android:importantForAccessibility="yes"
+ android:paddingTop="0dp"/>
<com.android.systemui.statusbar.AlphaOptimizedImageView
android:id="@+id/qs_detail_header_progress"
- android:src="@drawable/indeterminate_anim"
- android:alpha="0"
- android:background="@color/qs_detail_progress_track"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
+ android:alpha="0"
+ android:background="@color/qs_detail_progress_track"
+ android:src="@drawable/indeterminate_anim"
/>
<TextView
android:id="@+id/header_debug_info"
- android:visibility="invisible"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:fontFamily="sans-serif-condensed"
+ android:padding="2dp"
+ android:textColor="#00A040"
android:textSize="11dp"
android:textStyle="bold"
- android:textColor="#00A040"
- android:padding="2dp"
+ android:visibility="invisible"
/>
</com.android.systemui.statusbar.phone.QuickStatusBarHeader>
android:singleLine="true"
android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Clock"
android:textSize="@dimen/qs_time_collapsed_size"
+ android:textColor="?android:attr/textColorPrimary"
/>
<TextClock
android:id="@+id/am_pm_view"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Clock"
android:textSize="@dimen/qs_time_collapsed_size"
+ android:textColor="?android:attr/textColorPrimary"
android:importantForAccessibility="no"
/>
android:id="@+id/empty_time_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:visibility="invisible"
+ android:visibility="gone"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Clock"
+ android:textColor="?android:attr/textColorPrimary"
/>
</com.android.systemui.statusbar.policy.SplitClockView>
<LinearLayout android:id="@+id/status_bar_contents"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:paddingStart="@dimen/status_bar_padding_start"
+ android:paddingStart="6dp"
android:paddingEnd="8dp"
android:orientation="horizontal"
>
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:src="@drawable/ic_access_alarms_small"
+ android:tint="?android:attr/textColorPrimary"
android:paddingStart="6dp"
android:gravity="center"
android:visibility="gone" />
android:scaleType="center"
android:layout_toStartOf="@android:id/button2"
android:contentDescription="@string/accessibility_quick_settings_less_time"
+ android:tint="?android:attr/textColorPrimary"
android:src="@drawable/ic_qs_minus" />
<ImageView
android:scaleType="center"
android:layout_centerVertical="true"
android:contentDescription="@string/accessibility_quick_settings_more_time"
+ android:tint="?android:attr/textColorPrimary"
android:src="@drawable/ic_qs_plus" />
</RelativeLayout>
\ No newline at end of file
<attr name="decayTime" format="integer" />
<attr name="orientation" />
</declare-styleable>
+ <attr name="frameColor" format="color" />
<declare-styleable name="BatteryMeterView">
- <attr name="frameColor" format="color" />
+ <attr name="frameColor" />
</declare-styleable>
<declare-styleable name="Clock">
<attr name="amPmStyle" format="enum">
<attr name="framePadding" format="dimension" />
<!-- {@deprecated Use a statelist in frameColor instead.} -->
<attr name="activeFrameColor" format="color" />
- <attr name="frameColor" format="color" />
+ <attr name="frameColor" />
<attr name="badgeDiameter" format="dimension" />
<attr name="badgeMargin" format="dimension" />
</declare-styleable>
<dimen name="close_handle_underlap">32dp</dimen>
<!-- Height of the status bar header bar -->
- <dimen name="status_bar_header_height">104dp</dimen>
+ <dimen name="status_bar_header_height">126dp</dimen>
<!-- Height of the status bar header bar when expanded -->
<dimen name="status_bar_header_height_expanded">116dp</dimen>
<!-- The size of the gesture span needed to activate the "pull" notification expansion -->
<dimen name="pull_span_min">25dp</dimen>
- <dimen name="qs_tile_height">88dp</dimen>
- <dimen name="qs_tile_margin">16dp</dimen>
+ <dimen name="qs_tile_height">80dp</dimen>
+ <dimen name="qs_tile_margin">36dp</dimen>
<dimen name="qs_tile_margin_top">16dp</dimen>
<dimen name="qs_quick_tile_size">48dp</dimen>
<dimen name="qs_quick_tile_padding">12dp</dimen>
<dimen name="qs_time_collapsed_size">14sp</dimen>
<!-- The font size of the time when expanded in QS -->
- <dimen name="qs_time_expanded_size">20sp</dimen>
+ <dimen name="qs_time_expanded_size">14sp</dimen>
<!-- The font size of the "emergency calls only" label in QS -->
<dimen name="qs_emergency_calls_only_text_size">12sp</dimen>
<item name="android:textColor">@color/status_bar_clock_color</item>
</style>
- <style name="TextAppearance.StatusBar.Expanded" parent="@*android:style/TextAppearance.StatusBar" />
+ <style name="TextAppearance.StatusBar.Expanded" parent="@*android:style/TextAppearance.StatusBar">
+ <item name="android:textColor">?android:attr/textColorTertiary</item>
+ </style>
<style name="TextAppearance.StatusBar.Expanded.Clock">
<item name="android:textSize">@dimen/qs_time_expanded_size</item>
- <item name="android:fontFamily">sans-serif-medium</item>
+ <item name="android:fontFamily">sans-serif-condensed</item>
<item name="android:textColor">?android:attr/textColorPrimary</item>
+ <item name="android:textStyle">normal</item>
</style>
<style name="TextAppearance.StatusBar.Expanded.Date">
<item name="android:textSize">@dimen/qs_date_collapsed_size</item>
<item name="android:textStyle">normal</item>
<item name="android:textColor">?android:attr/textColorSecondary</item>
+ <item name="android:fontFamily">sans-serif-condensed</item>
</style>
<style name="TextAppearance.StatusBar.Expanded.AboveDateTime">
<item name="android:textSize">@dimen/qs_emergency_calls_only_text_size</item>
<item name="android:textStyle">normal</item>
- <item name="android:textColor">?android:attr/textColorSecondary</item>
+ <item name="android:textColor">?android:attr/textColorTertiary</item>
</style>
<style name="TextAppearance.StatusBar.Expanded.EmergencyCallsOnly"
<style name="TextAppearance.StatusBar.Expanded.UserSwitcher">
<item name="android:textSize">16sp</item>
<item name="android:textStyle">normal</item>
- <item name="android:textColor">@color/qs_user_detail_name</item>
+ <item name="android:textColor">?android:attr/textColorSecondary</item>
</style>
<style name="TextAppearance.StatusBar.Expanded.UserSwitcher.UserName" />
<style name="TextAppearance.QS.DetailButton">
<item name="android:textSize">@dimen/qs_detail_button_text_size</item>
- <item name="android:textColor">@color/qs_detail_button</item>
+ <item name="android:textColor">?android:attr/textColorSecondary</item>
<item name="android:textAllCaps">true</item>
<item name="android:fontFamily">sans-serif-medium</item>
<item name="android:gravity">center</item>
<style name="TextAppearance.QS.DetailEmpty">
<item name="android:textSize">@dimen/qs_detail_empty_text_size</item>
- <item name="android:textColor">@color/qs_subhead</item>
+ <item name="android:textColor">?android:attr/textColorPrimary</item>
</style>
<style name="TextAppearance.QS.Subhead">
}
int backgroundColor = getBackgroundColor(darkIntensity);
int fillColor = getFillColor(darkIntensity);
+ setColors(fillColor, backgroundColor);
+ mOldDarkIntensity = darkIntensity;
+ }
+
+ public void setColors(int fillColor, int backgroundColor) {
mIconTint = fillColor;
mFramePaint.setColor(backgroundColor);
mBoltPaint.setColor(fillColor);
mChargeColor = fillColor;
invalidateSelf();
- mOldDarkIntensity = darkIntensity;
}
private int getBackgroundColor(float darkIntensity) {
@Override
public void onAttachedToWindow() {
super.onAttachedToWindow();
- mBatteryController.addCallback(this);
- mDrawable.startListening();
TunerService.get(getContext()).addTunable(this, StatusBarIconController.ICON_BLACKLIST);
}
public void setBatteryController(BatteryController mBatteryController) {
this.mBatteryController = mBatteryController;
mDrawable.setBatteryController(mBatteryController);
+ mBatteryController.addCallback(this);
+ mDrawable.startListening();
}
public void setDarkIntensity(float f) {
mDrawable.setDarkIntensity(f);
}
+
+ public void setRawColors(int fgColor, int bgColor) {
+ mDrawable.setColors(fgColor, bgColor);
+ }
}
package com.android.systemui.qs;
import android.content.Context;
+import android.content.res.ColorStateList;
+import android.content.res.TypedArray;
import android.graphics.drawable.AnimatedVectorDrawable;
import android.util.AttributeSet;
import android.util.Log;
+import android.util.TypedValue;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
while (numPages < getChildCount()) {
removeViewAt(getChildCount() - 1);
}
+ TypedArray array = getContext().obtainStyledAttributes(
+ new int[]{android.R.attr.colorForeground});
+ int color = array.getColor(0, 0);
+ array.recycle();
while (numPages > getChildCount()) {
ImageView v = new ImageView(mContext);
v.setImageResource(R.drawable.minor_a_b);
+ v.setImageTintList(ColorStateList.valueOf(color));
addView(v, new LayoutParams(mPageIndicatorWidth, mPageIndicatorHeight));
}
// Refresh state.
for (int i = 0; i < N; i++) {
getChildAt(i).measure(widthChildSpec, heightChildSpec);
}
- int width = (mPageIndicatorWidth - mPageDotWidth) * N + mPageDotWidth;
+ int width = (mPageIndicatorWidth - mPageDotWidth) * (N - 1) + mPageDotWidth;
setMeasuredDimension(width, mPageIndicatorHeight);
}
private PageIndicator mPageIndicator;
private int mNumPages;
- private View mDecorGroup;
private PageListener mPageListener;
private int mPosition;
@Override
protected void onFinishInflate() {
super.onFinishInflate();
- mPageIndicator = (PageIndicator) findViewById(R.id.page_indicator);
- mDecorGroup = findViewById(R.id.page_decor);
- ((LayoutParams) mDecorGroup.getLayoutParams()).isDecor = true;
-
- mPages.add((TilePage) LayoutInflater.from(mContext)
+ mPages.add((TilePage) LayoutInflater.from(getContext())
.inflate(R.layout.qs_paged_page, this, false));
}
+ public void setPageIndicator(PageIndicator indicator) {
+ mPageIndicator = indicator;
+ }
+
@Override
public int getOffsetTop(TileRecord tile) {
final ViewGroup parent = (ViewGroup) tile.tileView.getParent();
if (++index == mPages.size()) {
if (DEBUG) Log.d(TAG, "Adding page for "
+ tile.tile.getClass().getSimpleName());
- mPages.add((TilePage) LayoutInflater.from(mContext)
+ mPages.add((TilePage) LayoutInflater.from(getContext())
.inflate(R.layout.qs_paged_page, this, false));
}
}
}
if (DEBUG) Log.d(TAG, "Size: " + mNumPages);
mPageIndicator.setNumPages(mNumPages);
- mDecorGroup.setVisibility(mNumPages > 1 ? View.VISIBLE : View.GONE);
+ mPageIndicator.setVisibility(mNumPages > 1 ? View.VISIBLE : View.GONE);
setAdapter(mAdapter);
mAdapter.notifyDataSetChanged();
setCurrentItem(0, false);
maxHeight = height;
}
}
- setMeasuredDimension(getMeasuredWidth(), maxHeight
- + (mDecorGroup.getVisibility() != View.GONE ? mDecorGroup.getMeasuredHeight() : 0));
+ setMeasuredDimension(getMeasuredWidth(), maxHeight);
}
private final Runnable mDistribute = new Runnable() {
public TilePage(Context context, AttributeSet attrs) {
super(context, attrs);
updateResources();
- setContentDescription(mContext.getString(R.string.accessibility_desc_quick_settings));
+ setContentDescription(getContext().getString(R.string.accessibility_desc_quick_settings));
}
@Override
translationYBuilder.addFloat(label, "translationY", -yDiff, 0);
mTopFiveQs.add(tileIcon);
+ mTopFiveQs.add(tileView.getBgCicle());
mAllViews.add(tileIcon);
mAllViews.add(quickTileView);
} else if (mFullRows && isIconInAnimatedRow(count)) {
// Make brightness appear static position and alpha in through second half.
View brightness = mQsPanel.getBrightnessView();
if (brightness != null) {
- firstPageBuilder.addFloat(brightness, "translationY", mQsPanel.getHeight(), 0);
+// firstPageBuilder.addFloat(brightness, "translationY", mQsPanel.getHeight(), 0);
mBrightnessAnimator = new TouchAnimator.Builder()
.addFloat(brightness, "alpha", 0, 1)
+ .addFloat(mQsPanel.getPageIndicator(), "alpha", 0, 1)
.setStartDelay(.5f)
.build();
mAllViews.add(brightness);
import android.content.Context;
import android.graphics.Point;
-import android.graphics.Rect;
import android.util.AttributeSet;
import android.view.View;
-import android.view.ViewGroup;
import android.widget.FrameLayout;
import com.android.systemui.R;
-import com.android.systemui.plugins.qs.QS.HeightListener;
import com.android.systemui.qs.customize.QSCustomizer;
-import com.android.systemui.statusbar.phone.NotificationsQuickSettingsContainer;
-import com.android.systemui.statusbar.phone.QSTileHost;
-import com.android.systemui.statusbar.phone.QuickStatusBarHeader;
/**
* Wrapper view with background which contains {@link QSPanel} and {@link BaseStatusBarHeader}
updateBottom();
}
- void updateBottom() {
+ public void updateBottom() {
int height = calculateContainerHeight();
setBottom(getTop() + height);
mQSDetail.setBottom(getTop() + height);
package com.android.systemui.qs;
+import static com.android.systemui.qs.QSTile.getColorForState;
+
+import android.animation.ValueAnimator;
import android.content.Context;
+import android.content.res.ColorStateList;
import android.content.res.Resources;
+import android.graphics.Color;
import android.graphics.drawable.Animatable;
import android.graphics.drawable.Drawable;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.ImageView.ScaleType;
+
import com.android.systemui.R;
import java.util.Objects;
protected final int mIconSizePx;
protected final int mTilePaddingBelowIconPx;
private boolean mAnimationEnabled = true;
+ private int mState = -1;
+ private int mTint;
public QSIconView(Context context) {
super(context);
@Override
protected void onLayout(boolean changed, int l, int t, int r, int b) {
final int w = getMeasuredWidth();
- final int h = getMeasuredHeight();
int top = 0;
final int iconLeft = (w - mIcon.getMeasuredWidth()) / 2;
layout(mIcon, iconLeft, top);
} else {
iv.clearColorFilter();
}
+ if (state.state != mState) {
+ int color = getColorForState(getContext(), state.state);
+ mState = state.state;
+ if (iv.isShown()) {
+ animateGrayScale(mTint, color, iv);
+ mTint = color;
+ } else {
+ setTint(iv, color);
+ mTint = color;
+ }
+ }
+ }
+
+ public static void animateGrayScale(int fromColor, int toColor, ImageView iv) {
+ final float fromAlpha = Color.alpha(fromColor);
+ final float toAlpha = Color.alpha(toColor);
+ final float fromChannel = Color.red(fromColor);
+ final float toChannel = Color.red(toColor);
+
+ ValueAnimator anim = ValueAnimator.ofFloat(0, 1);
+ anim.setDuration(350);
+
+ anim.addUpdateListener(animation -> {
+ float fraction = animation.getAnimatedFraction();
+ int alpha = (int) (fromAlpha + (toAlpha - fromAlpha) * fraction);
+ int channel = (int) (fromChannel + (toChannel - fromChannel) * fraction);
+
+ setTint(iv, Color.argb(alpha, channel, channel, channel));
+ });
+ anim.start();
}
+ public static void setTint(ImageView iv, int color) {
+ iv.setImageTintList(ColorStateList.valueOf(color));
+ }
+
+
protected int getIconMeasureMode() {
return MeasureSpec.EXACTLY;
}
protected final ArrayList<TileRecord> mRecords = new ArrayList<TileRecord>();
protected final View mBrightnessView;
private final H mHandler = new H();
+ private final View mPageIndicator;
private int mPanelPaddingBottom;
private int mBrightnessPaddingTop;
setOrientation(VERTICAL);
- mBrightnessView = LayoutInflater.from(context).inflate(
- R.layout.quick_settings_brightness_dialog, this, false);
- addView(mBrightnessView);
-
setupTileLayout();
mFooter = new QSFooter(this, context);
addView(mFooter.getView());
+ mPageIndicator = LayoutInflater.from(context).inflate(
+ R.layout.qs_page_indicator, this, false);
+ addView(mPageIndicator);
+ if (mTileLayout instanceof PagedTileLayout) {
+ ((PagedTileLayout) mTileLayout).setPageIndicator((PageIndicator) mPageIndicator);
+ }
+
updateResources();
+ mBrightnessView = LayoutInflater.from(context).inflate(
+ R.layout.quick_settings_brightness_dialog, this, false);
+ addView(mBrightnessView);
+
mBrightnessController = new BrightnessController(getContext(),
(ImageView) findViewById(R.id.brightness_icon),
(ToggleSliderView) findViewById(R.id.brightness_slider));
+ }
+ public View getPageIndicator() {
+ return mPageIndicator;
}
protected void setupTileLayout() {
};
r.tile.addCallback(callback);
r.callback = callback;
- final View.OnClickListener click = new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- onTileClick(r.tile);
- }
- };
- final View.OnLongClickListener longClick = new View.OnLongClickListener() {
- @Override
- public boolean onLongClick(View v) {
- r.tile.longClick();
- return true;
- }
- };
- r.tileView.init(click, longClick);
+ r.tileView.init(v -> r.tile.click(), v -> r.tile.secondaryClick(), v -> {
+ r.tile.longClick();
+ return true;
+ });
r.tile.refreshState();
mRecords.add(r);
});
}
- protected void onTileClick(QSTile<?> tile) {
- tile.click();
- }
-
public void closeDetail() {
if (mCustomizePanel != null && mCustomizePanel.isShown()) {
// Treat this as a detail panel for now, to make things easy.
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
+import android.service.quicksettings.Tile;
import android.util.ArraySet;
import android.util.Log;
import android.util.SparseArray;
import java.util.Collection;
import java.util.Objects;
+import com.android.settingslib.Utils;
+
import static com.android.settingslib.RestrictedLockUtils.EnforcedAdmin;
+import com.android.systemui.R;
+
/**
* Base quick-settings tile, extend this to create a new tile.
*
private String mTileSpec;
public abstract TState newTileState();
+
abstract protected void handleClick();
+
abstract protected void handleUpdateState(TState state, Object arg);
/**
return null; // optional
}
- protected DetailAdapter createDetailAdapter() { throw new UnsupportedOperationException(); }
+ protected DetailAdapter createDetailAdapter() {
+ throw new UnsupportedOperationException();
+ }
/**
* Is a startup check whether this device currently supports this tile.
public abstract CharSequence getTileLabel();
+ public static int getColorForState(Context context, int state) {
+ switch (state) {
+ case Tile.STATE_UNAVAILABLE:
+ return Utils.getDisabled(context,
+ Utils.getColorAttr(context, android.R.attr.textColorTertiary));
+ case Tile.STATE_INACTIVE:
+ return Utils.getColorAttr(context, android.R.attr.textColorSecondary);
+ case Tile.STATE_ACTIVE:
+ return Utils.getColorAttr(context, android.R.attr.colorPrimary);
+ default:
+ Log.e("QSTile", "Invalid state " + state);
+ return 0;
+ }
+ }
+
protected final class H extends Handler {
private static final int ADD_CALLBACK = 1;
private static final int CLICK = 2;
public static class State {
public Icon icon;
+ public int state = Tile.STATE_ACTIVE;
public CharSequence label;
public CharSequence contentDescription;
public CharSequence dualLabelContentDescription;
|| !Objects.equals(other.expandedAccessibilityClassName,
expandedAccessibilityClassName)
|| !Objects.equals(other.disabledByPolicy, disabledByPolicy)
+ || !Objects.equals(other.state, state)
|| !Objects.equals(other.enforcedAdmin, enforcedAdmin);
other.icon = icon;
other.label = label;
other.expandedAccessibilityClassName = expandedAccessibilityClassName;
other.autoMirrorDrawable = autoMirrorDrawable;
other.disabledByPolicy = disabledByPolicy;
+ other.state = state;
if (enforcedAdmin == null) {
other.enforcedAdmin = null;
} else if (other.enforcedAdmin == null) {
sb.append(",autoMirrorDrawable=").append(autoMirrorDrawable);
sb.append(",disabledByPolicy=").append(disabledByPolicy);
sb.append(",enforcedAdmin=").append(enforcedAdmin);
+ sb.append(",state=").append(state);
return sb.append(']');
}
}
public boolean connected;
public boolean activityIn;
public boolean activityOut;
- public int overlayIconId;
public boolean filter;
public boolean isOverlayIconWide;
final SignalState o = (SignalState) other;
final boolean changed = o.connected != connected || o.activityIn != activityIn
|| o.activityOut != activityOut
- || o.overlayIconId != overlayIconId
|| o.isOverlayIconWide != isOverlayIconWide;
o.connected = connected;
o.activityIn = activityIn;
o.activityOut = activityOut;
- o.overlayIconId = overlayIconId;
o.filter = filter;
o.isOverlayIconWide = isOverlayIconWide;
return super.copyTo(other) || changed;
rt.insert(rt.length() - 1, ",connected=" + connected);
rt.insert(rt.length() - 1, ",activityIn=" + activityIn);
rt.insert(rt.length() - 1, ",activityOut=" + activityOut);
- rt.insert(rt.length() - 1, ",overlayIconId=" + overlayIconId);
rt.insert(rt.length() - 1, ",filter=" + filter);
rt.insert(rt.length() - 1, ",wideOverlayIcon=" + isOverlayIconWide);
return rt;
*/
package com.android.systemui.qs;
+import android.animation.ValueAnimator;
import android.content.Context;
+import android.content.res.ColorStateList;
import android.content.res.TypedArray;
+import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.RippleDrawable;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
+import android.service.quicksettings.Tile;
import android.text.TextUtils;
+import android.util.Log;
+import android.view.Gravity;
import android.view.View;
+import android.view.ViewGroup;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;
+import android.widget.FrameLayout;
+import android.widget.ImageView;
+import android.widget.ImageView.ScaleType;
import android.widget.LinearLayout;
import android.widget.Switch;
+import com.android.settingslib.Utils;
+
import com.android.systemui.R;
public class QSTileBaseView extends LinearLayout {
+ private static final String TAG = "QSTileBaseView";
private final H mHandler = new H();
+ private final ImageView mBg;
protected QSIconView mIcon;
protected RippleDrawable mRipple;
private Drawable mTileBackground;
private String mAccessibilityClass;
private boolean mTileState;
private boolean mCollapsedView;
+ private final int mColorActive;
+ private final int mColorInactive;
+ private final int mColorDisabled;
+ private int mCircleColor;
public QSTileBaseView(Context context, QSIconView icon) {
this(context, icon, false);
public QSTileBaseView(Context context, QSIconView icon, boolean collapsedView) {
super(context);
+ // Default to Quick Tile padding, and QSTileView will specify its own padding.
+ int padding = context.getResources().getDimensionPixelSize(R.dimen.qs_quick_tile_padding);
+
+ FrameLayout frame = new FrameLayout(context);
+ frame.setForegroundGravity(Gravity.CENTER);
+ int size = context.getResources().getDimensionPixelSize(R.dimen.qs_quick_tile_size);
+ addView(frame, new LayoutParams(size, size));
+ mBg = new ImageView(getContext());
+ mBg.setScaleType(ScaleType.FIT_CENTER);
+ mBg.setImageResource(R.drawable.ic_qs_circle);
+ frame.addView(mBg);
mIcon = icon;
- addView(mIcon);
+ FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(
+ ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
+ params.setMargins(0, padding, 0, padding);
+ frame.addView(mIcon, params);
+ mColorActive = Utils.getColorAttr(context, android.R.attr.textColorPrimary);
+ mColorDisabled = Utils.getDisabled(context,
+ Utils.getColorAttr(context, android.R.attr.textColorTertiary));
+ mColorInactive = Utils.getColorAttr(context, android.R.attr.textColorSecondary);
mTileBackground = newTileBackground();
if (mTileBackground instanceof RippleDrawable) {
setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES);
setBackground(mTileBackground);
- // Default to Quick Tile padding, and QSTileView will specify its own padding.
- int padding = context.getResources().getDimensionPixelSize(R.dimen.qs_quick_tile_padding);
- setPadding(0, padding, 0, padding);
+ setPadding(0, 0, 0, 0);
setClipChildren(false);
setClipToPadding(false);
mCollapsedView = collapsedView;
setFocusable(true);
}
+ public View getBgCicle() {
+ return mBg;
+ }
+
protected Drawable newTileBackground() {
- final int[] attrs = new int[] { android.R.attr.selectableItemBackgroundBorderless };
- final TypedArray ta = mContext.obtainStyledAttributes(attrs);
+ final int[] attrs = new int[]{android.R.attr.selectableItemBackgroundBorderless};
+ final TypedArray ta = getContext().obtainStyledAttributes(attrs);
final Drawable d = ta.getDrawable(0);
ta.recycle();
return d;
// center the touch feedback on the center of the icon, and dial it down a bit
final int cx = width / 2;
final int cy = height / 2;
- final int rad = (int)(mIcon.getHeight() * .85f);
+ final int rad = (int) (mIcon.getHeight() * .85f);
mRipple.setHotspotBounds(cx - rad, cy - rad, cx + rad, cy + rad);
}
- public void init(OnClickListener click, OnLongClickListener longClick) {
+ public void init(OnClickListener click, OnClickListener secondaryClick,
+ OnLongClickListener longClick) {
setClickable(true);
setOnClickListener(click);
setOnLongClickListener(longClick);
}
protected void handleStateChanged(QSTile.State state) {
+ int circleColor = getCircleColor(state.state);
+ if (circleColor != mCircleColor) {
+ if (mBg.isShown()) {
+ QSIconView.animateGrayScale(mCircleColor, circleColor, mBg);
+ } else {
+ QSIconView.setTint(mBg, circleColor);
+ }
+ mCircleColor = circleColor;
+ }
+
mIcon.setIcon(state);
if (mCollapsedView && !TextUtils.isEmpty(state.minimalContentDescription)) {
setContentDescription(state.minimalContentDescription);
}
}
+ private int getCircleColor(int state) {
+ switch (state) {
+ case Tile.STATE_ACTIVE:
+ return mColorActive;
+ case Tile.STATE_INACTIVE:
+ case Tile.STATE_UNAVAILABLE:
+ return mColorDisabled;
+ default:
+ Log.e(TAG, "Invalid state " + state);
+ return 0;
+ }
+ }
+
public QSIconView getIcon() {
return mIcon;
}
package com.android.systemui.qs;
+import static com.android.systemui.qs.QSTile.getColorForState;
+
import android.content.Context;
import android.content.res.Configuration;
-import android.content.res.Resources;
-import android.util.MathUtils;
+import android.service.quicksettings.Tile;
+import android.text.SpannableStringBuilder;
+import android.text.style.ForegroundColorSpan;
import android.view.Gravity;
import android.view.LayoutInflater;
+import android.view.MotionEvent;
import android.view.View;
+import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.android.systemui.FontSizeUtils;
import com.android.systemui.R;
+
import libcore.util.Objects;
/** View that represents a standard quick settings tile. **/
public class QSTileView extends QSTileBaseView {
- private final int mTileSpacingPx;
- private int mTilePaddingTopPx;
protected TextView mLabel;
private ImageView mPadLock;
+ private int mState;
+ private OnClickListener mClick;
+ private OnClickListener mSecondaryClick;
public QSTileView(Context context, QSIconView icon) {
this(context, icon, false);
public QSTileView(Context context, QSIconView icon, boolean collapsedView) {
super(context, icon, collapsedView);
- final Resources res = context.getResources();
- mTileSpacingPx = res.getDimensionPixelSize(R.dimen.qs_tile_spacing);
-
setClipChildren(false);
+ setClipToPadding(false);
setClickable(true);
- updateTopPadding();
setId(View.generateViewId());
createLabel();
setOrientation(VERTICAL);
return mLabel;
}
- protected void updateTopPadding() {
- Resources res = getResources();
- int padding = res.getDimensionPixelSize(R.dimen.qs_tile_padding_top);
- int largePadding = res.getDimensionPixelSize(R.dimen.qs_tile_padding_top_large_text);
- float largeFactor = (MathUtils.constrain(getResources().getConfiguration().fontScale,
- 1.0f, FontSizeUtils.LARGE_TEXT_SCALE) - 1f) / (FontSizeUtils.LARGE_TEXT_SCALE - 1f);
- mTilePaddingTopPx = Math.round((1 - largeFactor) * padding + largeFactor * largePadding);
- setPadding(mTileSpacingPx, mTilePaddingTopPx + mTileSpacingPx, mTileSpacingPx,
- mTileSpacingPx);
- requestLayout();
- }
-
@Override
protected void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
- updateTopPadding();
FontSizeUtils.updateFontSize(mLabel, R.dimen.qs_tile_text_size);
}
protected void createLabel() {
- View view = LayoutInflater.from(mContext).inflate(R.layout.qs_tile_label, null);
+ ViewGroup view = (ViewGroup) LayoutInflater.from(getContext())
+ .inflate(R.layout.qs_tile_label, null);
+ view.setClipChildren(false);
+ view.setClipToPadding(false);
mLabel = (TextView) view.findViewById(R.id.tile_label);
mPadLock = (ImageView) view.findViewById(R.id.restricted_padlock);
addView(view);
@Override
protected void handleStateChanged(QSTile.State state) {
super.handleStateChanged(state);
- if (!Objects.equal(mLabel.getText(), state.label)) {
+ if (!Objects.equal(mLabel.getText(), state.label) || mState != state.state) {
+ if (state.state == Tile.STATE_UNAVAILABLE) {
+ int color = getColorForState(getContext(), state.state);
+ state.label = new SpannableStringBuilder().append(state.label,
+ new ForegroundColorSpan(color),
+ SpannableStringBuilder.SPAN_INCLUSIVE_INCLUSIVE);
+ }
+ mState = state.state;
mLabel.setText(state.label);
}
mLabel.setEnabled(!state.disabledByPolicy);
mPadLock.setVisibility(state.disabledByPolicy ? View.VISIBLE : View.GONE);
}
+
+ @Override
+ public void init(OnClickListener click, OnClickListener secondaryClick, OnLongClickListener longClick) {
+ mClick = click;
+ mSecondaryClick = secondaryClick;
+ super.init(click, secondaryClick, longClick);
+ }
+
+ @Override
+ public boolean onTouchEvent(MotionEvent event) {
+ if (event.getActionMasked() == MotionEvent.ACTION_UP) {
+ setOnClickListener(event.getY() < (getMeasuredHeight() / 2) ? mClick : mSecondaryClick);
+ }
+ return super.onTouchEvent(event);
+ }
}
}
mTileLayout = new HeaderTileLayout(context);
mTileLayout.setListening(mListening);
- addView((View) mTileLayout, 1 /* Between brightness and footer */);
+ addView((View) mTileLayout, 0 /* Between brightness and footer */);
}
@Override
}
@Override
- protected void onTileClick(QSTile<?> tile) {
- tile.secondaryClick();
- }
-
- @Override
public void onTuningChanged(String key, String newValue) {
// No tunings for you.
if (key.equals(QS_SHOW_BRIGHTNESS)) {
private FrameLayout mIconFrame;
private ImageView mSignal;
- private ImageView mOverlay;
private ImageView mIn;
private ImageView mOut;
mIconFrame = new FrameLayout(mContext);
mSignal = new ImageView(mContext);
mIconFrame.addView(mSignal);
- mOverlay = new ImageView(mContext);
- mIconFrame.addView(mOverlay, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
return mIconFrame;
}
public void setIcon(QSTile.State state) {
final SignalState s = (SignalState) state;
setIcon(mSignal, s);
- if (s.overlayIconId > 0) {
- mOverlay.setVisibility(VISIBLE);
- mOverlay.setImageResource(s.overlayIconId);
- } else {
- mOverlay.setVisibility(GONE);
- }
- if (s.overlayIconId > 0 && s.isOverlayIconWide) {
- mSignal.setPaddingRelative(mWideOverlayIconStartPadding, 0, 0, 0);
- } else {
- mSignal.setPaddingRelative(0, 0, 0, 0);
- }
Drawable drawable = mSignal.getDrawable();
if (state.autoMirrorDrawable && drawable != null) {
drawable.setAutoMirrored(true);
*/
package com.android.systemui.qs.external;
-import static android.view.Display.DEFAULT_DISPLAY;
-import static android.view.WindowManager.LayoutParams.TYPE_QS_DIALOG;
-
import android.app.ActivityManager;
import android.content.ComponentName;
-import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
-import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.ResolveInfo;
import android.content.pm.ServiceInfo;
import android.graphics.drawable.Drawable;
import android.text.style.ForegroundColorSpan;
import android.util.Log;
import android.view.IWindowManager;
+import android.view.WindowManager;
import android.view.WindowManagerGlobal;
import com.android.internal.logging.MetricsLogger;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
+import com.android.systemui.R;
import com.android.systemui.qs.QSTile;
import com.android.systemui.qs.external.TileLifecycleManager.TileChangeListener;
import com.android.systemui.statusbar.phone.QSTileHost;
import libcore.util.Objects;
+import static android.view.Display.DEFAULT_DISPLAY;
+import static android.view.WindowManager.LayoutParams.TYPE_QS_DIALOG;
+
public class CustomTile extends QSTile<QSTile.State> implements TileChangeListener {
public static final String PREFIX = "custom(";
private final IQSTileService mService;
private final TileServiceManager mServiceManager;
private final int mUser;
- private Context mAppContext;
private android.graphics.drawable.Icon mDefaultIcon;
private boolean mListening;
mService = mServiceManager.getTileService();
mServiceManager.setTileChangeListener(this);
mUser = ActivityManager.getCurrentUser();
- try {
- mAppContext = mContext.createPackageContext(mComponent.getPackageName(), 0);
- } catch (NameNotFoundException e) {
- }
}
private void setTileIcon() {
if (mServiceManager.hasPendingBind()) {
tileState = Tile.STATE_UNAVAILABLE;
}
+ state.state = tileState;
Drawable drawable;
- boolean mHasRes = false;
- android.graphics.drawable.Icon icon = mTile.getIcon();
try {
- drawable = icon.loadDrawable(mAppContext);
- mHasRes = icon.getType() == android.graphics.drawable.Icon.TYPE_RESOURCE;
+ drawable = mTile.getIcon().loadDrawable(mContext);
} catch (Exception e) {
Log.w(TAG, "Invalid icon, forcing into unavailable state");
tileState = Tile.STATE_UNAVAILABLE;
- drawable = mDefaultIcon.loadDrawable(mAppContext);
+ drawable = mDefaultIcon.loadDrawable(mContext);
}
- final int color = TileColorPicker.getInstance(mContext).getColor(tileState);
- drawable.setTint(color);
- state.icon = mHasRes ? new DrawableIconWithRes(drawable, icon.getResId())
- : new DrawableIcon(drawable);
+ state.icon = new DrawableIcon(drawable);
state.label = mTile.getLabel();
- if (tileState == Tile.STATE_UNAVAILABLE) {
- state.label = new SpannableStringBuilder().append(state.label,
- new ForegroundColorSpan(color),
- SpannableStringBuilder.SPAN_INCLUSIVE_INCLUSIVE);
- }
if (mTile.getContentDescription() != null) {
state.contentDescription = mTile.getContentDescription();
} else {
import android.net.ConnectivityManager;
import android.provider.Settings;
import android.provider.Settings.Global;
+import android.service.quicksettings.Tile;
import android.widget.Switch;
import com.android.internal.logging.MetricsLogger;
} else {
state.icon = mDisable;
}
+ state.state = airplaneMode ? Tile.STATE_ACTIVE : Tile.STATE_INACTIVE;
state.contentDescription = state.label;
state.minimalAccessibilityClassName = state.expandedAccessibilityClassName
= Switch.class.getName();
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
-import android.graphics.PorterDuff.Mode;
-import android.graphics.PorterDuffColorFilter;
import android.graphics.drawable.Drawable;
-import android.os.Handler;
import android.service.quicksettings.Tile;
import android.text.SpannableStringBuilder;
import android.text.Spanned;
import com.android.systemui.R;
import com.android.systemui.plugins.qs.QS.DetailAdapter;
import com.android.systemui.qs.QSTile;
-import com.android.systemui.qs.external.TileColorPicker;
import com.android.systemui.statusbar.phone.PhoneStatusBar;
import com.android.systemui.statusbar.policy.BatteryController;
@Override
protected void handleClick() {
+ mBatteryController.setPowerSaveMode(!mPowerSave);
+ }
+
+ @Override
+ protected void handleSecondaryClick() {
showDetail(true);
}
int level = (arg != null) ? (Integer) arg : mLevel;
String percentage = NumberFormat.getPercentInstance().format((double) level / 100.0);
- state.icon = new Icon() {
- @Override
- public Drawable getDrawable(Context context) {
- BatteryMeterDrawable drawable =
- new BatteryMeterDrawable(context,
- context.getColor(R.color.batterymeter_frame_color));
- drawable.onBatteryLevelChanged(mLevel, mPluggedIn, mCharging);
- drawable.onPowerSaveChanged(mPowerSave);
- final int color = TileColorPicker.getInstance(context).getColor(Tile.STATE_ACTIVE);
- drawable.setColorFilter(new PorterDuffColorFilter(color, Mode.SRC_IN));
- return drawable;
- }
-
- @Override
- public int getPadding() {
- return mHost.getContext().getResources().getDimensionPixelSize(
- R.dimen.qs_battery_padding);
- }
- };
- state.label = percentage;
+ state.state = mCharging ? Tile.STATE_UNAVAILABLE
+ : mPowerSave ? Tile.STATE_ACTIVE : Tile.STATE_INACTIVE;
+ state.icon = ResourceIcon.get(R.drawable.ic_qs_battery_saver);
+ state.label = mContext.getString(R.string.battery_detail_switch_title);
state.contentDescription = mContext.getString(R.string.accessibility_quick_settings_battery,
percentage) + "," +
(mPowerSave ? mContext.getString(R.string.battery_saver_notification_title)
mLevel = level;
mPluggedIn = pluggedIn;
mCharging = charging;
- refreshState((Integer) level);
+ refreshState(level);
if (mDetailShown) {
mBatteryDetail.postBindView();
}
mDrawable.onBatteryLevelChanged(100, false, false);
mDrawable.onPowerSaveChanged(true);
mDrawable.disableShowPercent();
-
- final int color = TileColorPicker.getInstance(mCurrentView.getContext())
- .getColor(Tile.STATE_ACTIVE);
- mDrawable.setColorFilter(new PorterDuffColorFilter(color, Mode.SRC_IN));
-
((ImageView) mCurrentView.findViewById(android.R.id.icon)).setImageDrawable(mDrawable);
Checkable checkbox = (Checkable) mCurrentView.findViewById(android.R.id.toggle);
checkbox.setChecked(mPowerSave);
import android.content.Context;
import android.content.Intent;
import android.provider.Settings;
+import android.service.quicksettings.Tile;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
}
@Override
- protected void handleSecondaryClick() {
+ protected void handleClick() {
// Secondary clicks are header clicks, just toggle.
final boolean isEnabled = (Boolean)mState.value;
MetricsLogger.action(mContext, getMetricsCategory(), !isEnabled);
}
@Override
- protected void handleClick() {
+ protected void handleSecondaryClick() {
if (!mController.canConfigBluetooth()) {
mHost.startActivityDismissingKeyguard(new Intent(Settings.ACTION_BLUETOOTH_SETTINGS));
return;
if (TextUtils.isEmpty(state.label)) {
state.label = mContext.getString(R.string.quick_settings_bluetooth_label);
}
+ state.state = Tile.STATE_ACTIVE;
} else {
state.icon = ResourceIcon.get(R.drawable.ic_qs_bluetooth_off);
state.label = mContext.getString(R.string.quick_settings_bluetooth_label);
state.contentDescription = mContext.getString(
R.string.accessibility_quick_settings_bluetooth_off);
+ state.state = Tile.STATE_INACTIVE;
}
CharSequence bluetoothName = state.label;
import android.content.Context;
import android.content.Intent;
import android.provider.Settings;
+import android.service.quicksettings.Tile;
import android.util.Log;
import android.view.View;
import android.view.View.OnAttachStateChangeListener;
}
@Override
+ protected void handleSecondaryClick() {
+ handleClick();
+ }
+
+ @Override
protected void handleClick() {
if (mKeyguard.isSecure() && !mKeyguard.canSkipBouncer()) {
mHost.startRunnableDismissingKeyguard(new Runnable() {
if (!state.value && connecting) {
state.label = mContext.getString(R.string.quick_settings_connecting);
}
+ state.state = state.value ? Tile.STATE_ACTIVE : Tile.STATE_INACTIVE;
state.icon = ResourceIcon.get(state.value ? R.drawable.ic_qs_cast_on
: R.drawable.ic_qs_cast_off);
mDetailAdapter.updateItems(devices);
import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
+import android.service.quicksettings.Tile;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@Override
protected void handleClick() {
+ mDataController.setMobileDataEnabled(!mDataController.isMobileDataEnabled());
+ }
+
+ @Override
+ protected void handleSecondaryClick() {
MetricsLogger.action(mContext, getMetricsCategory());
if (mDataController.isMobileDataSupported()) {
showDetail(true);
: !cb.enabled || cb.airplaneModeEnabled ? R.drawable.ic_qs_signal_disabled
: cb.mobileSignalIconId > 0 ? cb.mobileSignalIconId
: R.drawable.ic_qs_signal_no_signal;
- state.icon = ResourceIcon.get(iconId);
+ if (cb.dataTypeIconId != 0) {
+ state.icon = ResourceIcon.get(cb.dataTypeIconId);
+ } else {
+ state.icon = ResourceIcon.get(iconId);
+ }
state.isOverlayIconWide = cb.isDataTypeIconWide;
state.autoMirrorDrawable = !cb.noSim;
- state.overlayIconId = cb.enabled && (cb.dataTypeIconId > 0) ? cb.dataTypeIconId : 0;
state.filter = iconId != R.drawable.ic_qs_no_sim;
state.activityIn = cb.enabled && cb.activityIn;
state.activityOut = cb.enabled && cb.activityOut;
= Button.class.getName();
state.value = mDataController.isMobileDataSupported()
&& mDataController.isMobileDataEnabled();
+ state.state = state.value ? Tile.STATE_ACTIVE : Tile.STATE_INACTIVE;
}
@Override
import android.content.Intent;
import android.provider.Settings;
import android.provider.Settings.Secure;
+import android.service.quicksettings.Tile;
import android.widget.Switch;
import com.android.internal.logging.MetricsLogger;
final int value = arg instanceof Integer ? (Integer) arg : mSetting.getValue();
final boolean enabled = value != 0;
state.value = enabled;
+ state.state = state.value ? Tile.STATE_ACTIVE : Tile.STATE_INACTIVE;
state.label = mContext.getString(R.string.quick_settings_inversion_label);
state.icon = enabled ? mEnable : mDisable;
state.minimalAccessibilityClassName = state.expandedAccessibilityClassName
import android.content.DialogInterface;
import android.content.Intent;
+import android.service.quicksettings.Tile;
import android.widget.Switch;
import com.android.internal.logging.MetricsLogger;
protected void handleUpdateState(BooleanState state, Object arg) {
state.value = arg instanceof Boolean ? (Boolean) arg
: mDataSaverController.isDataSaverEnabled();
+ state.state = state.value ? Tile.STATE_ACTIVE : Tile.STATE_INACTIVE;
state.label = mContext.getString(R.string.data_saver);
state.contentDescription = state.label;
state.icon = ResourceIcon.get(state.value ? R.drawable.ic_data_saver
import android.os.UserManager;
import android.provider.Settings;
import android.provider.Settings.Global;
+import android.service.quicksettings.Tile;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnAttachStateChangeListener;
}
@Override
- public void handleClick() {
+ protected void handleClick() {
+ if (mState.value) {
+ mController.setZen(Global.ZEN_MODE_OFF, null, TAG);
+ } else {
+ int zen = Prefs.getInt(mContext, Prefs.Key.DND_FAVORITE_ZEN, Global.ZEN_MODE_ALARMS);
+ mController.setZen(zen, null, TAG);
+ }
+ }
+
+ @Override
+ protected void handleSecondaryClick() {
if (mController.isVolumeRestricted()) {
// Collapse the panels, so the user can see the toast.
mHost.collapsePanels();
return;
}
MetricsLogger.action(mContext, getMetricsCategory(), !mState.value);
- if (mState.value) {
- mController.setZen(Global.ZEN_MODE_OFF, null, TAG);
- } else {
- showDetail(true);
- int zen = Prefs.getInt(mContext, Prefs.Key.DND_FAVORITE_ZEN, Global.ZEN_MODE_ALARMS);
- mController.setZen(zen, null, TAG);
- }
+ showDetail(true);
+ int zen = Prefs.getInt(mContext, Prefs.Key.DND_FAVORITE_ZEN, Global.ZEN_MODE_ALARMS);
+ mController.setZen(zen, null, TAG);
}
@Override
final boolean newValue = zen != Global.ZEN_MODE_OFF;
final boolean valueChanged = state.value != newValue;
state.value = newValue;
+ state.state = state.value ? Tile.STATE_ACTIVE : Tile.STATE_INACTIVE;
checkIfRestrictionEnforcedByAdminOnly(state, UserManager.DISALLOW_ADJUST_VOLUME);
switch (zen) {
case Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS:
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.systemui.R;
import com.android.systemui.qs.QSTile;
-import com.android.systemui.qs.external.TileColorPicker;
import com.android.systemui.statusbar.policy.FlashlightController;
/** Quick settings tile: Control flashlight **/
public FlashlightTile(Host host) {
super(host);
mFlashlightController = host.getFlashlightController();
+ mFlashlightController.addCallback(this);
}
@Override
protected void handleDestroy() {
super.handleDestroy();
+ mFlashlightController.removeCallback(this);
}
@Override
protected void handleUpdateState(BooleanState state, Object arg) {
state.label = mHost.getContext().getString(R.string.quick_settings_flashlight_label);
if (!mFlashlightController.isAvailable()) {
- Drawable icon = mHost.getContext().getDrawable(R.drawable.ic_signal_flashlight_disable)
+ Drawable icon = mHost.getContext().getDrawable(R.drawable.ic_signal_flashlight_enable)
.mutate();
- final int disabledColor = TileColorPicker.getInstance(mContext)
- .getColor(Tile.STATE_UNAVAILABLE);
- icon.setTint(disabledColor);
state.icon = new DrawableIcon(icon);
- state.label = new SpannableStringBuilder().append(state.label,
- new ForegroundColorSpan(disabledColor),
- SpannableStringBuilder.SPAN_INCLUSIVE_INCLUSIVE);
state.contentDescription = mContext.getString(
R.string.accessibility_quick_settings_flashlight_unavailable);
+ state.state = Tile.STATE_UNAVAILABLE;
return;
}
if (arg instanceof Boolean) {
state.contentDescription = mContext.getString(R.string.quick_settings_flashlight_label);
state.minimalAccessibilityClassName = state.expandedAccessibilityClassName
= Switch.class.getName();
+ state.state = state.value ? Tile.STATE_ACTIVE : Tile.STATE_INACTIVE;
}
@Override
import com.android.systemui.R;
import com.android.systemui.qs.GlobalSetting;
import com.android.systemui.qs.QSTile;
-import com.android.systemui.qs.external.TileColorPicker;
import com.android.systemui.statusbar.policy.HotspotController;
/** Quick settings tile: Hotspot **/
boolean wasAirplane = state.isAirplaneMode;
state.isAirplaneMode = mAirplaneMode.getValue() != 0;
if (state.isAirplaneMode) {
- final int disabledColor = TileColorPicker.getInstance(mContext)
- .getColor(Tile.STATE_UNAVAILABLE);
- state.label = new SpannableStringBuilder().append(state.label,
- new ForegroundColorSpan(disabledColor),
- SpannableStringBuilder.SPAN_INCLUSIVE_INCLUSIVE);
state.icon = mUnavailable;
} else if (wasAirplane) {
state.icon = mDisableNoAnimation;
state.minimalAccessibilityClassName = state.expandedAccessibilityClassName
= Switch.class.getName();
state.contentDescription = state.label;
+ state.state = state.isAirplaneMode ? Tile.STATE_UNAVAILABLE
+ : state.value ? Tile.STATE_ACTIVE : Tile.STATE_INACTIVE;
}
@Override
import android.os.UserManager;
import android.provider.Settings;
+import android.service.quicksettings.Tile;
import android.widget.Switch;
import com.android.internal.logging.MetricsLogger;
state.contentDescription = mContext.getString(
R.string.accessibility_quick_settings_location_off);
}
+ state.state = state.value ? Tile.STATE_ACTIVE : Tile.STATE_INACTIVE;
state.minimalAccessibilityClassName = state.expandedAccessibilityClassName
= Switch.class.getName();
}
import android.app.ActivityManager;
import android.content.Intent;
import android.provider.Settings;
+import android.service.quicksettings.Tile;
import android.widget.Switch;
import com.android.internal.app.NightDisplayController;
: R.drawable.ic_qs_night_display_off);
state.minimalAccessibilityClassName = state.expandedAccessibilityClassName =
Switch.class.getName();
+ state.state = state.value ? Tile.STATE_ACTIVE : Tile.STATE_INACTIVE;
}
@Override
import android.content.res.Configuration;
import android.provider.Settings;
+import android.service.quicksettings.Tile;
import android.widget.Switch;
import com.android.internal.logging.MetricsLogger;
state.contentDescription = getAccessibilityString(rotationLocked);
state.minimalAccessibilityClassName = state.expandedAccessibilityClassName
= Switch.class.getName();
+ state.state = state.value ? Tile.STATE_ACTIVE : Tile.STATE_INACTIVE;
}
public static boolean isCurrentOrientationLockPortrait(RotationLockController controller,
import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.provider.Settings;
+import android.service.quicksettings.Tile;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
}
@Override
- protected void handleSecondaryClick() {
+ protected void handleClick() {
// Secondary clicks are header clicks, just toggle.
mState.copyTo(mStateBeforeClick);
MetricsLogger.action(mContext, getMetricsCategory(), !mState.value);
}
@Override
- protected void handleClick() {
+ protected void handleSecondaryClick() {
if (!mWifiController.canConfigWifi()) {
mHost.startActivityDismissingKeyguard(new Intent(Settings.ACTION_WIFI_SETTINGS));
return;
state.dualLabelContentDescription = wifiName;
state.expandedAccessibilityClassName = Button.class.getName();
state.minimalAccessibilityClassName = Switch.class.getName();
+ state.state = state.value ? Tile.STATE_ACTIVE : Tile.STATE_INACTIVE;
}
@Override
import android.content.Intent;
import android.provider.Settings;
+import android.service.quicksettings.Tile;
import android.widget.Switch;
import com.android.internal.logging.MetricsLogger;
}
state.minimalAccessibilityClassName = state.expandedAccessibilityClassName
= Switch.class.getName();
+ state.state = state.value ? Tile.STATE_ACTIVE : Tile.STATE_INACTIVE;
}
@Override
public void setNetworkController(NetworkControllerImpl nc) {
if (DEBUG) Log.d(TAG, "NetworkController=" + nc);
mNC = nc;
+ mNC.addCallback(this);
}
public void setSecurityController(SecurityController sc) {
super.onAttachedToWindow();
for (PhoneState state : mPhoneStates) {
- mMobileSignalGroup.addView(state.mMobileGroup);
+ if (state.mMobileGroup.getParent() == null) {
+ mMobileSignalGroup.addView(state.mMobileGroup);
+ }
}
int endPadding = mMobileSignalGroup.getChildCount() > 0 ? mMobileSignalGroupEndPadding : 0;
apply();
applyIconTint();
- mNC.addCallback(this);
}
@Override
mDozeServiceHost.firePowerSaveChanged(isPowerSave);
}
}
+
@Override
public void onBatteryLevelChanged(int level, boolean pluggedIn, boolean charging) {
// noop
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
+import android.graphics.Color;
+import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.RippleDrawable;
+import android.icu.text.NumberFormat;
import android.os.UserManager;
+import android.support.annotation.VisibleForTesting;
import android.util.AttributeSet;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.TextView;
import android.widget.Toast;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.logging.MetricsLogger;
import com.android.internal.logging.nano.MetricsProto;
import com.android.keyguard.KeyguardStatusView;
+import com.android.settingslib.Utils;
+import com.android.systemui.BatteryMeterView;
import com.android.systemui.FontSizeUtils;
import com.android.systemui.R;
import com.android.systemui.plugins.qs.QS.ActivityStarter;
import com.android.systemui.plugins.qs.QS.BaseStatusBarHeader;
-import com.android.systemui.qs.QSPanel;
import com.android.systemui.plugins.qs.QS.Callback;
+import com.android.systemui.qs.QSPanel;
import com.android.systemui.qs.QuickQSPanel;
import com.android.systemui.qs.TouchAnimator;
import com.android.systemui.qs.TouchAnimator.Builder;
+import com.android.systemui.statusbar.SignalClusterView;
import com.android.systemui.statusbar.policy.BatteryController;
+import com.android.systemui.statusbar.policy.BatteryController.BatteryStateChangeCallback;
import com.android.systemui.statusbar.policy.NetworkController.EmergencyListener;
+import com.android.systemui.statusbar.policy.NetworkControllerImpl;
import com.android.systemui.statusbar.policy.NextAlarmController;
import com.android.systemui.statusbar.policy.NextAlarmController.NextAlarmChangeCallback;
import com.android.systemui.statusbar.policy.UserInfoController;
import com.android.systemui.tuner.TunerService;
public class QuickStatusBarHeader extends BaseStatusBarHeader implements
- NextAlarmChangeCallback, OnClickListener, OnUserInfoChangedListener, EmergencyListener {
+ NextAlarmChangeCallback, OnClickListener, OnUserInfoChangedListener, EmergencyListener,
+ BatteryStateChangeCallback {
private static final String TAG = "QuickStatusBarHeader";
private TextView mAlarmStatus;
private View mAlarmStatusCollapsed;
+ private ViewGroup mDateTimeGroup;
+ private ViewGroup mDateTimeAlarmGroup;
private QSPanel mQsPanel;
private boolean mExpanded;
private boolean mAlarmShowing;
- private ViewGroup mDateTimeGroup;
- private ViewGroup mDateTimeAlarmGroup;
private TextView mEmergencyOnly;
protected ExpandableIndicator mExpandIndicator;
protected View mEdit;
private boolean mShowFullAlarm;
private float mDateTimeTranslation;
+ private TextView mBatteryLevel;
public QuickStatusBarHeader(Context context, AttributeSet attrs) {
super(context, attrs);
mAlarmStatus = (TextView) findViewById(R.id.alarm_status);
mAlarmStatus.setOnClickListener(this);
+ mBatteryLevel = (TextView) findViewById(R.id.battery_level);
+
mMultiUserSwitch = (MultiUserSwitch) findViewById(R.id.multi_user_switch);
mMultiUserAvatar = (ImageView) mMultiUserSwitch.findViewById(R.id.multi_user_avatar);
mExpandIndicator.setExpanded(headerExpansionFraction > EXPAND_INDICATOR_THRESHOLD);
}
- @Override
@VisibleForTesting
public void onDetachedFromWindow() {
setListening(false);
mHost.getUserInfoController().removeCallback(this);
mHost.getNetworkController().removeEmergencyListener(this);
- mHost.getUserInfoController().removeCallback(this);
super.onDetachedFromWindow();
}
if (isAPhone) {
mHost.getNetworkController().addEmergencyListener(this);
}
+
+ // Set the light/dark theming on the header status UI to match the current theme.
+ SignalClusterView cluster = (SignalClusterView) findViewById(R.id.signal_cluster);
+ cluster.setNetworkController((NetworkControllerImpl) host.getNetworkController());
+ cluster.setSecurityController(host.getSecurityController());
+ int colorForeground = Utils.getColorAttr(getContext(), android.R.attr.colorForeground);
+ float intensity = colorForeground / (float) Color.WHITE;
+ cluster.setIconTint(colorForeground, intensity,
+ new Rect(0, 0, 0, 0));
+ BatteryMeterView battery = (BatteryMeterView) findViewById(R.id.battery);
+ battery.setBatteryController(host.getBatteryController());
+ int colorSecondary = Utils.getColorAttr(getContext(), android.R.attr.textColorSecondary);
+ battery.setRawColors(colorForeground, colorSecondary);
}
@Override
}
public void setBatteryController(BatteryController batteryController) {
- // Don't care
+ batteryController.addCallback(this);
}
public void setUserInfoController(UserInfoController userInfoController) {
}
@Override
+ public void onBatteryLevelChanged(int level, boolean pluggedIn, boolean charging) {
+ String percentage = NumberFormat.getPercentInstance().format((double) level / 100.0);
+ mBatteryLevel.setText(percentage);
+ }
+
+ @Override
+ public void onPowerSaveChanged(boolean isPowerSave) {
+ // Don't care.
+ }
+
+ @Override
public void onUserInfoChanged(String name, Drawable picture, String userAccount) {
mMultiUserAvatar.setImageDrawable(picture);
}
static final int ICON_CARRIER_NETWORK_CHANGE =
R.drawable.stat_sys_signal_carrier_network_change_animation;
- static final int ICON_DATA_DISABLED = R.drawable.stat_sys_data_disabled;
+ static final int ICON_DATA_DISABLED = R.drawable.ic_qs_data_disabled;
static final int QS_ICON_LTE = R.drawable.ic_qs_signal_lte;
static final int QS_ICON_3G = R.drawable.ic_qs_signal_3g;