Show different tooltips for QS features auto-added and non-auto-added

There are 2 different kinds of auto-added / non-auto-added illustrations in QS tooltips for framework features. Show animation in the settings page for full flow for non-framework services.

Bug: 218968108
Test: manual testing
Change-Id: I9c95c9f3e60ce94ce4059e27ef93c1dacce7a5c7
This commit is contained in:
menghanli
2022-02-21 11:47:02 +08:00
parent dff5a34eed
commit cad616bd9a
3 changed files with 68 additions and 2 deletions

View File

@@ -0,0 +1,62 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2022 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="178dp"
android:height="150dp"
android:viewportWidth="178"
android:viewportHeight="150">
<path
android:pathData="M161.612,147.208L16.619,147.208A13,13 0,0 1,3.619 134.208L3.619,-442.725A13,13 0,0 1,16.619 -455.725L161.612,-455.725A13,13 0,0 1,174.612 -442.725L174.612,134.208A13,13 0,0 1,161.612 147.208z"
android:strokeWidth="6"
android:fillColor="#ffffff"
android:strokeColor="#EDEDED"/>
<path
android:pathData="M28.47,103.945L48.47,103.945A12,12 0,0 1,60.47 115.945L60.47,115.945A12,12 0,0 1,48.47 127.945L28.47,127.945A12,12 0,0 1,16.47 115.945L16.47,115.945A12,12 0,0 1,28.47 103.945z"
android:fillColor="#797272"/>
<path
android:pathData="M38.5,115.5m-15.5,0a15.5,15.5 0,1 1,31 0a15.5,15.5 0,1 1,-31 0"
android:fillColor="#BCEDDF"
android:fillAlpha="0.5"/>
<path
android:pathData="M45.279,108.52L46.48,109.72C47.182,110.414 47.182,111.543 46.48,112.237L34.717,124H31V120.283L42.763,108.52C43.457,107.827 44.586,107.827 45.279,108.52ZM32.778,122.222L34.032,122.275L42.763,113.535L41.51,112.281L32.778,121.013V122.222Z"
android:fillColor="#ffffff"
android:fillType="evenOdd"/>
<path
android:pathData="M79,104L99,104A12,12 0,0 1,111 116L111,116A12,12 0,0 1,99 128L79,128A12,12 0,0 1,67 116L67,116A12,12 0,0 1,79 104z"
android:fillColor="#E0DCDC"/>
<path
android:pathData="M79,104L99,104A12,12 0,0 1,111 116L111,116A12,12 0,0 1,99 128L79,128A12,12 0,0 1,67 116L67,116A12,12 0,0 1,79 104z"
android:fillColor="#E7E7E7"/>
<path
android:pathData="M129,104L149,104A12,12 0,0 1,161 116L161,116A12,12 0,0 1,149 128L129,128A12,12 0,0 1,117 116L117,116A12,12 0,0 1,129 104z"
android:fillColor="#E0DCDC"/>
<path
android:pathData="M129,104L149,104A12,12 0,0 1,161 116L161,116A12,12 0,0 1,149 128L129,128A12,12 0,0 1,117 116L117,116A12,12 0,0 1,129 104z"
android:fillColor="#E7E7E7"/>
<path
android:pathData="M22,14L76.49,14A6,6 0,0 1,82.49 20L82.49,38.782A6,6 0,0 1,76.49 44.782L22,44.782A6,6 0,0 1,16 38.782L16,20A6,6 0,0 1,22 14z"
android:fillColor="#EDEDED"/>
<path
android:pathData="M22,56L76.49,56A6,6 0,0 1,82.49 62L82.49,80.782A6,6 0,0 1,76.49 86.782L22,86.782A6,6 0,0 1,16 80.782L16,62A6,6 0,0 1,22 56z"
android:fillColor="#EDEDED"/>
<path
android:pathData="M101,14L155.49,14A6,6 0,0 1,161.49 20L161.49,38.782A6,6 0,0 1,155.49 44.782L101,44.782A6,6 0,0 1,95 38.782L95,20A6,6 0,0 1,101 14z"
android:fillColor="#EDEDED"/>
<path
android:pathData="M101,56L155.49,56A6,6 0,0 1,161.49 62L161.49,80.782A6,6 0,0 1,155.49 86.782L101,86.782A6,6 0,0 1,95 80.782L95,62A6,6 0,0 1,101 56z"
android:fillColor="#EDEDED"/>
</vector>

View File

@@ -509,7 +509,9 @@ public abstract class AccessibilityShortcutPreferenceFragment extends DashboardF
? R.string.accessibility_service_qs_tooltips_content
: R.string.accessibility_service_auto_added_qs_tooltips_content;
final String title = getString(titleResId, tileName);
final int imageResId = R.drawable.accessibility_qs_tooltips_illustration;
final int imageResId = mNeedsQSTooltipType == QuickSettingsTooltipType.GUIDE_TO_EDIT
? R.drawable.accessibility_qs_tooltips_illustration
: R.drawable.accessibility_auto_added_qs_tooltips_illustration;
mTooltipWindow = new AccessibilityQuickSettingsTooltipWindow(getContext());
mTooltipWindow.setup(title, imageResId);
mTooltipWindow.showAtTopCenter(getView());

View File

@@ -879,7 +879,9 @@ public abstract class ToggleFeaturePreferenceFragment extends SettingsPreference
? R.string.accessibility_service_qs_tooltips_content
: R.string.accessibility_service_auto_added_qs_tooltips_content;
final String title = getString(titleResId, tileName);
final int imageResId = R.drawable.accessibility_qs_tooltips_illustration;
final int imageResId = mNeedsQSTooltipType == QuickSettingsTooltipType.GUIDE_TO_EDIT
? R.drawable.accessibility_qs_tooltips_illustration
: R.drawable.accessibility_auto_added_qs_tooltips_illustration;
mTooltipWindow = new AccessibilityQuickSettingsTooltipWindow(getContext());
mTooltipWindow.setup(title, imageResId);
mTooltipWindow.showAtTopCenter(getView());