Update the instruction images in Accessibility edit shortcut dialog.

1. Update the material next style.
2. Support for Lottie image.

Bug: 195094388
Test: manual test
Change-Id: I1fba7ee1d18b53f4c917319d2c0a4a304de0ae43
This commit is contained in:
Peter_Liang
2021-07-30 18:10:21 +08:00
parent e9f836a004
commit c2a04e3820
20 changed files with 2461 additions and 62 deletions

View File

@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2021 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="412dp"
android:height="300dp"
android:viewportWidth="412"
android:viewportHeight="300">
<path
android:fillColor="#FF000000"
android:pathData="M384.2,300H27.8C12.5,300 0,287.2 0,271.5v-243C0,12.8 12.5,0 27.8,0h356.5C399.5,0 412,12.8 412,28.5v243.2C412,287.2 399.5,300 384.2,300z"/>
<path
android:pathData="M206.1,19.1c35,0 67.9,13.6 92.6,38.4C323.4,82.1 337,115 337,150s-13.6,67.9 -38.4,92.6C273.9,267.3 241,281 206,281s-67.9,-13.6 -92.6,-38.4C88.8,217.9 75.1,185 75.1,150s13.6,-67.9 38.4,-92.6S171.1,19.1 206.1,19.1M206.1,17.1c-73.4,0 -133,59.5 -133,132.9S132.6,282.9 206,282.9s133,-59.5 133,-132.9S279.5,17.1 206.1,17.1L206.1,17.1z"
android:fillColor="#3C4043"/>
<path
android:pathData="M287,187.8v-1.5h2.9v-13.7c0,-1.6 -1.3,-2.9 -2.9,-2.9v-23.2c1.6,0 2.9,-1.3 2.9,-2.9V132c0,-1.6 -1.3,-2.9 -2.9,-2.9V68.4c0,-8 -6.5,-14.5 -14.5,-14.5H139.4c-8,0 -14.5,6.5 -14.5,14.5v185.3c1,0.7 1.9,1.4 2.9,2.1V68.4c0,-6.4 5.2,-11.6 11.6,-11.6h133.1c6.4,0 11.6,5.2 11.6,11.6v188.7c1,-0.7 1.9,-1.4 2.9,-2.2v-50.5c1.6,0 2.9,-1.3 2.9,-2.9v-13.7H287z"
android:fillColor="#80868B"/>
<path
android:pathData="M287,204.4c1.6,0 2.9,-1.3 2.9,-2.9v-14H287v-0.9h2.9v-14c0,-1.6 -1.3,-2.9 -2.9,-2.9"
android:fillColor="#669DF6"/>
<path
android:pathData="M825.7,300H469.3c-15.3,0 -27.8,-12.8 -27.8,-28.5v-243C441.5,12.8 454,0 469.3,0h356.5c15.2,0 27.7,12.8 27.7,28.5v243.2C853.5,287.2 841,300 825.7,300z"
android:fillColor="#FFFFFF"/>
<path
android:pathData="M728.5,187.8v-1.5h2.9v-13.7c0,-1.6 -1.3,-2.9 -2.9,-2.9v-23.2c1.6,0 2.9,-1.3 2.9,-2.9V132c0,-1.6 -1.3,-2.9 -2.9,-2.9V68.4c0,-8 -6.5,-14.5 -14.5,-14.5H580.9c-8,0 -14.5,6.5 -14.5,14.5v185.3c1,0.7 1.9,1.4 2.9,2.1V68.4c0,-6.4 5.2,-11.6 11.6,-11.6H714c6.4,0 11.6,5.2 11.6,11.6v188.7c1,-0.7 1.9,-1.4 2.9,-2.2v-50.5c1.6,0 2.9,-1.3 2.9,-2.9v-13.7H728.5z"
android:fillColor="#DADCE0"/>
<path
android:pathData="M728.5,204.4c1.6,0 2.9,-1.3 2.9,-2.9v-14h-2.9v-0.9h2.9v-14c0,-1.6 -1.3,-2.9 -2.9,-2.9"
android:fillColor="#1A73E8"/>
<path
android:pathData="M648.2,19.1c35,0 67.9,13.6 92.6,38.4c24.7,24.6 38.3,57.5 38.3,92.5s-13.6,67.9 -38.4,92.6C716,267.3 683.1,281 648.1,281s-67.9,-13.6 -92.6,-38.4c-24.6,-24.7 -38.3,-57.6 -38.3,-92.6s13.6,-67.9 38.4,-92.6C580.4,32.7 613.2,19.1 648.2,19.1M648.2,17.1c-73.4,0 -133,59.5 -133,132.9s59.5,132.9 132.9,132.9s133,-59.5 133,-132.9S721.6,17.1 648.2,17.1L648.2,17.1z"
android:fillColor="#E8EAED"/>
</vector>

View File

@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2021 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="412dp"
android:height="300dp"
android:viewportWidth="412"
android:viewportHeight="300">
<path
android:fillColor="#FF000000"
android:pathData="M384.2,300H27.8C12.5,300 0,287.2 0,271.5V28.5C0,12.8 12.5,0 27.8,0H384.3C399.5,0 412,12.8 412,28.5V271.7C412,287.2 399.5,300 384.2,300Z"/>
<path
android:pathData="M142,225.3H275.1a14.51,14.51 0,0 0,14.5 -14.5V69a2.9,2.9 0,0 0,2.9 -2.9v-17c-1.9,-1.6 -3.8,-3.2 -5.8,-4.7V210.8a11.61,11.61 0,0 1,-11.6 11.6H142a11.61,11.61 0,0 1,-11.6 -11.6V42.7c-1,0.7 -1.9,1.4 -2.9,2.1V210.9A14.62,14.62 0,0 0,142 225.3Z"
android:fillColor="#80868b"/>
<path
android:pathData="M286.7,210.83a11.59,11.59 0,0 1,-11.58 11.58H142a11.59,11.59 0,0 1,-11.58 -11.58V183.26H286.7Z"
android:fillColor="#3c4043"/>
<path
android:pathData="M250.41,193.38a1.77,1.77 0,1 1,-1.78 1.77A1.77,1.77 0,0 1,250.41 193.38ZM253.07,199.58v11.53h-1.78v-5.32h-1.77v5.32h-1.77L247.75,199.58a30.78,30.78 0,0 1,-5.32 -0.89l0.44,-1.77a32.34,32.34 0,0 0,15.07 0l0.45,1.77A30.78,30.78 0,0 1,253.07 199.58Z"
android:fillColor="#fff"/>
<path
android:pathData="M208.55,202.84m-6.13,0a6.13,6.13 0,1 1,12.26 0a6.13,6.13 0,1 1,-12.26 0"
android:fillColor="#80868b"/>
<path
android:pathData="M250.41,202.84m-22.28,0a22.28,22.28 0,1 1,44.56 0a22.28,22.28 0,1 1,-44.56 0"
android:strokeWidth="2"
android:fillColor="#00000000"
android:strokeColor="#669df6"/>
<path
android:pathData="M160.45,202.84l10.43,6.02l0,-12.05l-10.43,6.03z"
android:fillColor="#80868b"/>
<path
android:pathData="M207.4,19.1a131.11,131.11 0,0 1,131 131,131 131,0 0,1 -262,-0.1 130.94,130.94 0,0 1,131 -130.9m0,-2A132.9,132.9 0,1 0,340.3 150,133 133,0 0,0 207.4,17.1Z"
android:fillColor="#3c4043"/>
</vector>

View File

@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2021 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="412dp"
android:height="300dp"
android:viewportWidth="412"
android:viewportHeight="300">
<path
android:fillColor="#FF000000"
android:pathData="M384.2,300H27.8C12.5,300 0,287.2 0,271.5V28.5C0,12.8 12.5,0 27.8,0H384.3C399.5,0 412,12.8 412,28.5V271.7C412,287.2 399.5,300 384.2,300Z"/>
<path
android:pathData="M142,225.3H275.1a14.51,14.51 0,0 0,14.5 -14.5V69a2.9,2.9 0,0 0,2.9 -2.9v-17c-1.9,-1.6 -3.8,-3.2 -5.8,-4.7V210.8a11.61,11.61 0,0 1,-11.6 11.6H142a11.61,11.61 0,0 1,-11.6 -11.6V42.7c-1,0.7 -1.9,1.4 -2.9,2.1V210.9A14.62,14.62 0,0 0,142 225.3Z"
android:fillColor="#80868b"/>
<path
android:strokeWidth="1"
android:pathData="M286.7,144.13H266a19.63,19.63 0,1 0,0 39.26H286.7"
android:fillColor="#00000000"
android:strokeColor="#80868b"/>
<path
android:pathData="M266,148.65a15.11,15.11 0,1 0,15.1 15.11A15.11,15.11 0,0 0,266 148.65ZM266,155.93a1.59,1.59 0,0 1,0 3.17,1.59 1.59,0 1,1 0,-3.17ZM268.37,161.47v10.29h-1.58L266.79,167h-1.59v4.75h-1.58L263.62,161.47a27.23,27.23 0,0 1,-4.75 -0.79l0.4,-1.58a29.06,29.06 0,0 0,13.46 0l0.39,1.58A27.23,27.23 0,0 1,268.33 161.47Z"
android:fillColor="#dadce0"/>
<path
android:pathData="M207.4,19.1a131.11,131.11 0,0 1,131 131,131 131,0 0,1 -262,-0.1 130.94,130.94 0,0 1,131 -130.9m0,-2A132.9,132.9 0,1 0,340.3 150,133 133,0 0,0 207.4,17.1Z"
android:fillColor="#3c4043"/>
</vector>

View File

@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2021 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="412dp"
android:height="300dp"
android:viewportWidth="412"
android:viewportHeight="300">
<path
android:fillColor="#FF000000"
android:pathData="M384.2,300H27.8C12.5,300 0,287.2 0,271.5v-243C0,12.8 12.5,0 27.8,0h356.5C399.5,0 412,12.8 412,28.5v243.2C412,287.2 399.5,300 384.2,300z"/>
<path
android:pathData="M139.5,225.3h133.1c8,0 14.5,-6.5 14.5,-14.5V69c1.6,0 2.9,-1.3 2.9,-2.9v-17c-1.9,-1.6 -3.8,-3.2 -5.8,-4.7v166.4c0,6.4 -5.2,11.6 -11.6,11.6H139.5c-6.4,0 -11.6,-5.2 -11.6,-11.6V42.7c-1,0.7 -1.9,1.4 -2.9,2.1v166.1C125.1,218.8 131.6,225.3 139.5,225.3z"
android:fillColor="#80868B"/>
<path
android:pathData="M229.9,207.9h-47.8c-1.1,0 -2,0.9 -2,2s0.9,2 2,2h47.8c1.1,0 2,-0.9 2,-2S231,207.9 229.9,207.9z"
android:fillColor="#80868B"/>
<path
android:pathData="M198.4,205.7v-11.4h4.9l-6.9,-12.2l-6.9,12.2h4.9v11.4c-1.9,0.8 -3.2,2.6 -3.2,4.8c0,2.9 2.3,5.2 5.2,5.2s5.2,-2.3 5.2,-5.2C201.6,208.4 200.2,206.5 198.4,205.7z"
android:fillColor="#669DF6"/>
<path
android:pathData="M217.7,205.7v-11.4h4.9l-6.9,-12.2l-6.9,12.2h4.9v11.4c-1.9,0.8 -3.2,2.6 -3.2,4.8c0,2.9 2.3,5.2 5.2,5.2s5.2,-2.3 5.2,-5.2C220.9,208.4 219.6,206.5 217.7,205.7z"
android:fillColor="#669DF6"/>
<path
android:pathData="M206.1,19.1c35,0 67.9,13.6 92.6,38.4c24.7,24.7 38.4,57.6 38.4,92.6s-13.6,67.9 -38.4,92.6c-24.7,24.7 -57.6,38.4 -92.6,38.4s-67.9,-13.6 -92.6,-38.4C88.8,217.9 75.1,185 75.1,150s13.6,-67.9 38.4,-92.6C138.2,32.7 171.1,19.1 206.1,19.1M206.1,17.1c-73.4,0 -133,59.5 -133,132.9S132.6,282.9 206,282.9S339,223.4 339,150S279.5,17.1 206.1,17.1L206.1,17.1z"
android:fillColor="#3C4043"/>
</vector>

View File

@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2021 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="412dp"
android:height="300dp"
android:viewportWidth="412"
android:viewportHeight="300">
<path
android:fillColor="#FF000000"
android:pathData="M384.2,300H27.8C12.5,300 0,287.2 0,271.5v-243C0,12.8 12.5,0 27.8,0h356.5C399.5,0 412,12.8 412,28.5v243.2C412,287.2 399.5,300 384.2,300z"/>
<path
android:pathData="M138,225.3h133.1c8,0 14.5,-6.5 14.5,-14.5V69c1.6,0 2.9,-1.3 2.9,-2.9V45.7c-1.9,-1.5 -3.8,-2.9 -5.8,-4.3v169.4c0,6.4 -5.2,11.6 -11.6,11.6H138c-6.4,0 -11.6,-5.2 -11.6,-11.6V43.5c-1,0.7 -1.9,1.5 -2.9,2.2v165C123.5,218.8 130,225.3 138,225.3z"
android:fillColor="#80868B"/>
<path
android:pathData="M206,283.9c-73.9,0 -133.9,-60.1 -133.9,-133.9S132.1,16.1 206,16.1c73.9,0 133.9,60.1 133.9,133.9S279.9,283.9 206,283.9zM206,18.1C133.2,18.1 74.1,77.2 74.1,150S133.2,281.9 206,281.9S337.9,222.8 337.9,150S278.8,18.1 206,18.1z"
android:fillColor="#3C4043"/>
<path
android:pathData="M229.9,207.9h-47.8c-1.1,0 -2,0.9 -2,2s0.9,2 2,2h47.8c1.1,0 2,-0.9 2,-2S231,207.9 229.9,207.9z"
android:fillColor="#80868B"/>
<path
android:pathData="M190.9,205.7v-11.4h4.9l-6.9,-12.2l-6.9,12.2h4.9v11.4c-1.9,0.8 -3.2,2.6 -3.2,4.8c0,2.9 2.3,5.2 5.2,5.2c2.9,0 5.2,-2.3 5.2,-5.2C194.1,208.4 192.8,206.5 190.9,205.7z"
android:fillColor="#669DF6"/>
<path
android:pathData="M208,205.7v-11.4h4.9l-6.9,-12.2l-6.9,12.2h4.9v11.4c-1.9,0.8 -3.2,2.6 -3.2,4.8c0,2.9 2.3,5.2 5.2,5.2c2.9,0 5.2,-2.3 5.2,-5.2C211.2,208.4 209.9,206.5 208,205.7z"
android:fillColor="#669DF6"/>
<path
android:pathData="M225.1,205.7v-11.4h4.9l-6.9,-12.2l-6.9,12.2h4.9v11.4c-1.9,0.8 -3.2,2.6 -3.2,4.8c0,2.9 2.3,5.2 5.2,5.2c2.9,0 5.2,-2.3 5.2,-5.2C228.2,208.4 226.9,206.5 225.1,205.7z"
android:fillColor="#669DF6"/>
</vector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

View File

@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2021 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="412dp"
android:height="300dp"
android:viewportWidth="412"
android:viewportHeight="300">
<path
android:pathData="M384.2,300H27.8C12.5,300 0,287.2 0,271.5v-243C0,12.8 12.5,0 27.8,0h356.5C399.5,0 412,12.8 412,28.5v243.2C412,287.2 399.5,300 384.2,300z"
android:fillColor="#FFFFFF"/>
<path
android:pathData="M287,187.8v-1.5h2.9v-13.7c0,-1.6 -1.3,-2.9 -2.9,-2.9v-23.2c1.6,0 2.9,-1.3 2.9,-2.9V132c0,-1.6 -1.3,-2.9 -2.9,-2.9V68.4c0,-8 -6.5,-14.5 -14.5,-14.5H139.4c-8,0 -14.5,6.5 -14.5,14.5v185.3c1,0.7 1.9,1.4 2.9,2.1V68.4c0,-6.4 5.2,-11.6 11.6,-11.6h133.1c6.4,0 11.6,5.2 11.6,11.6v188.7c1,-0.7 1.9,-1.4 2.9,-2.2v-50.5c1.6,0 2.9,-1.3 2.9,-2.9v-13.7L287,187.8L287,187.8z"
android:fillColor="#DADCE0"/>
<path
android:pathData="M287,204.4c1.6,0 2.9,-1.3 2.9,-2.9v-14H287v-0.9h2.9v-14c0,-1.6 -1.3,-2.9 -2.9,-2.9"
android:fillColor="#1A73E8"/>
<path
android:pathData="M206.7,19.1c35,0 67.9,13.6 92.6,38.4C324,82.1 337.6,115 337.6,150s-13.6,67.9 -38.4,92.6c-24.7,24.7 -57.6,38.4 -92.6,38.4s-67.9,-13.6 -92.6,-38.4C89.4,217.9 75.7,185 75.7,150s13.6,-67.9 38.4,-92.6C138.9,32.7 171.7,19.1 206.7,19.1M206.7,17.1c-73.4,0 -133,59.5 -133,132.9s59.5,132.9 132.9,132.9s133,-59.5 133,-132.9S280.1,17.1 206.7,17.1L206.7,17.1z"
android:fillColor="#E8EAED"/>
</vector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

View File

@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2021 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="412dp"
android:height="300dp"
android:viewportWidth="412"
android:viewportHeight="300">
<path
android:pathData="M384.2,300H27.8C12.5,300 0,287.2 0,271.5V28.5C0,12.8 12.5,0 27.8,0H384.3C399.5,0 412,12.8 412,28.5V271.7C412,287.2 399.5,300 384.2,300Z"
android:fillColor="#fff"/>
<path
android:pathData="M142,225.3H275.1a14.51,14.51 0,0 0,14.5 -14.5V69a2.9,2.9 0,0 0,2.9 -2.9v-17c-1.9,-1.6 -3.8,-3.2 -5.8,-4.7V210.8a11.61,11.61 0,0 1,-11.6 11.6H142a11.61,11.61 0,0 1,-11.6 -11.6V42.7c-1,0.7 -1.9,1.4 -2.9,2.1V210.9A14.62,14.62 0,0 0,142 225.3Z"
android:fillColor="#dadce0"/>
<path
android:pathData="M207.4,19.1a131.11,131.11 0,0 1,131 131,131 131,0 0,1 -262,-0.1 130.94,130.94 0,0 1,131 -130.9m0,-2A132.9,132.9 0,1 0,340.3 150,133 133,0 0,0 207.4,17.1Z"
android:fillColor="#e8eaed"/>
<path
android:fillColor="#FF000000"
android:pathData="M286.7,210.83a11.59,11.59 0,0 1,-11.58 11.58H142a11.59,11.59 0,0 1,-11.58 -11.58V183.26H286.7Z"/>
<path
android:pathData="M250.41,193.38a1.77,1.77 0,1 1,-1.78 1.77A1.77,1.77 0,0 1,250.41 193.38ZM253.07,199.58v11.53h-1.78v-5.32h-1.77v5.32h-1.77L247.75,199.58a30.78,30.78 0,0 1,-5.32 -0.89l0.44,-1.77a32.34,32.34 0,0 0,15.07 0l0.45,1.77A30.78,30.78 0,0 1,253.07 199.58Z"
android:fillColor="#fff"/>
<path
android:pathData="M208.55,202.84m-6.13,0a6.13,6.13 0,1 1,12.26 0a6.13,6.13 0,1 1,-12.26 0"
android:fillColor="#bdc1c6"/>
<path
android:pathData="M250.41,202.84m-22.28,0a22.28,22.28 0,1 1,44.56 0a22.28,22.28 0,1 1,-44.56 0"
android:strokeWidth="2"
android:fillColor="#00000000"
android:strokeColor="#1a73e8"/>
<path
android:pathData="M160.45,202.84l10.43,6.02l0,-12.05l-10.43,6.03z"
android:fillColor="#bdc1c6"/>
</vector>

View File

@@ -15,54 +15,25 @@
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="180dp"
android:height="180dp"
android:viewportWidth="180"
android:viewportHeight="180">
android:width="412dp"
android:height="300dp"
android:viewportWidth="412"
android:viewportHeight="300">
<path
android:pathData="M90,90m-89,0a89,89 0,1 1,178 0a89,89 0,1 1,-178 0"
android:strokeWidth="2"
android:fillColor="#00000000"
android:strokeColor="#ECEEEF"/>
<group>
<clip-path
android:pathData="M90,90m-87,0a87,87 0,1 1,174 0a87,87 0,1 1,-174 0"/>
android:pathData="M384.2,300H27.8C12.5,300 0,287.2 0,271.5V28.5C0,12.8 12.5,0 27.8,0H384.3C399.5,0 412,12.8 412,28.5V271.7C412,287.2 399.5,300 384.2,300Z"
android:fillColor="#fff"/>
<path
android:pathData="M35.4,-70.9L144.6,-70.9A6.3,6.3 0,0 1,150.9 -64.6L150.9,137.6A6.3,6.3 0,0 1,144.6 143.9L35.4,143.9A6.3,6.3 0,0 1,29.1 137.6L29.1,-64.6A6.3,6.3 0,0 1,35.4 -70.9z"
android:strokeWidth="1.8"
android:fillColor="#F2F3F4"
android:strokeColor="#DADCE0"/>
<group>
<clip-path
android:pathData="M35.4,-70.9L144.6,-70.9A6.3,6.3 0,0 1,150.9 -64.6L150.9,137.6A6.3,6.3 0,0 1,144.6 143.9L35.4,143.9A6.3,6.3 0,0 1,29.1 137.6L29.1,-64.6A6.3,6.3 0,0 1,35.4 -70.9z"/>
<path
android:pathData="M40.4,-69L140.6,-69A5.4,5.4 0,0 1,146 -63.6L146,132.6A5.4,5.4 0,0 1,140.6 138L40.4,138A5.4,5.4 0,0 1,35 132.6L35,-63.6A5.4,5.4 0,0 1,40.4 -69z"
android:fillColor="#ffffff"/>
<group>
<clip-path
android:pathData="M40.4,-69L140.6,-69A5.4,5.4 0,0 1,146 -63.6L146,132.6A5.4,5.4 0,0 1,140.6 138L40.4,138A5.4,5.4 0,0 1,35 132.6L35,-63.6A5.4,5.4 0,0 1,40.4 -69z"/>
android:pathData="M142,225.3H275.1a14.51,14.51 0,0 0,14.5 -14.5V69a2.9,2.9 0,0 0,2.9 -2.9v-17c-1.9,-1.6 -3.8,-3.2 -5.8,-4.7V210.8a11.61,11.61 0,0 1,-11.6 11.6H142a11.61,11.61 0,0 1,-11.6 -11.6V42.7c-1,0.7 -1.9,1.4 -2.9,2.1V210.9A14.62,14.62 0,0 0,142 225.3Z"
android:fillColor="#dadce0"/>
<path
android:strokeWidth="1"
android:pathData="M132,90.5L158,90.5A14.5,14.5 0,0 1,172.5 105L172.5,105A14.5,14.5 0,0 1,158 119.5L132,119.5A14.5,14.5 0,0 1,117.5 105L117.5,105A14.5,14.5 0,0 1,132 90.5z"
android:fillColor="#ffffff"
android:strokeColor="#DADCE0"/>
android:pathData="M286.7,144.13H266a19.63,19.63 0,1 0,0 39.26H286.7"
android:fillColor="#00000000"
android:strokeColor="#dadce0"/>
<path
android:pathData="M132.4,105m-11.2,0a11.2,11.2 0,1 1,22.4 0a11.2,11.2 0,1 1,-22.4 0"
android:fillColor="#80868B"/>
android:pathData="M266,148.65a15.11,15.11 0,1 0,15.1 15.11A15.11,15.11 0,0 0,266 148.65ZM266,155.93a1.59,1.59 0,0 1,0 3.17,1.59 1.59,0 1,1 0,-3.17ZM268.37,161.47v10.29h-1.58L266.79,167h-1.59v4.75h-1.58L263.62,161.47a27.23,27.23 0,0 1,-4.75 -0.79l0.4,-1.58a29.06,29.06 0,0 0,13.46 0l0.39,1.58A27.23,27.23 0,0 1,268.33 161.47Z"
android:fillColor="#5f6368"/>
<path
android:pathData="M133.467,100.733C133.467,101.32 132.987,101.8 132.4,101.8C131.813,101.8 131.333,101.32 131.333,100.733C131.333,100.147 131.813,99.666 132.4,99.666C132.987,99.666 133.467,100.147 133.467,100.733ZM132.4,102.333C133.909,102.333 135.541,102.173 136.933,101.8L137.2,102.867C136.208,103.133 135.067,103.309 134,103.4V110.333H132.933V107.133H131.867V110.333H130.8V103.4C129.733,103.309 128.592,103.133 127.6,102.867L127.867,101.8C129.259,102.173 130.891,102.333 132.4,102.333Z"
android:fillColor="#ffffff"
android:fillType="evenOdd"/>
<path
android:pathData="M121.719,120.653C121.719,121.29 121.198,121.81 120.562,121.81C119.927,121.81 119.406,121.29 119.406,120.653C119.406,120.017 119.927,119.497 120.562,119.497C121.198,119.497 121.719,120.017 121.719,120.653ZM120.562,122.533C122.38,122.533 124.346,122.316 126.023,121.81L126.344,123.255C125.149,123.617 123.774,123.855 122.49,123.978V133.374H121.205V129.038H119.92V133.374H118.635V123.978C117.351,123.855 115.976,123.617 114.781,123.255L115.102,121.81C116.779,122.316 118.745,122.533 120.562,122.533Z"
android:fillColor="#ffffff"
android:fillType="evenOdd"/>
<group>
<clip-path
android:pathData="M121.719,120.653C121.719,121.29 121.198,121.81 120.562,121.81C119.927,121.81 119.406,121.29 119.406,120.653C119.406,120.017 119.927,119.497 120.562,119.497C121.198,119.497 121.719,120.017 121.719,120.653ZM120.562,122.533C122.38,122.533 124.346,122.316 126.023,121.81L126.344,123.255C125.149,123.617 123.774,123.855 122.49,123.978V133.374H121.205V129.038H119.92V133.374H118.635V123.978C117.351,123.855 115.976,123.617 114.781,123.255L115.102,121.81C116.779,122.316 118.745,122.533 120.562,122.533Z"
android:fillType="evenOdd"/>
</group>
</group>
</group>
</group>
android:pathData="M207.4,19.1a131.11,131.11 0,0 1,131 131,131 131,0 0,1 -262,-0.1 130.94,130.94 0,0 1,131 -130.9m0,-2A132.9,132.9 0,1 0,340.3 150,133 133,0 0,0 207.4,17.1Z"
android:fillColor="#e8eaed"/>
</vector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

View File

@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2021 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="412dp"
android:height="300dp"
android:viewportWidth="412"
android:viewportHeight="300">
<path
android:fillColor="#FF000000"
android:pathData="M842.3,299.9H485.9c-15.3,0 -27.8,-12.8 -27.8,-28.5v-243c0,-15.7 12.5,-28.5 27.8,-28.5h356.5c15.2,0 27.7,12.8 27.7,28.5v243.2C870.1,287.1 857.6,299.9 842.3,299.9z"/>
<path
android:pathData="M597.6,225.2h133.1c8,0 14.5,-6.5 14.5,-14.5V68.9c1.6,0 2.9,-1.3 2.9,-2.9V49c-1.9,-1.6 -3.8,-3.2 -5.8,-4.7v166.4c0,6.4 -5.2,11.6 -11.6,11.6H597.6c-6.4,0 -11.6,-5.2 -11.6,-11.6V42.6c-1,0.7 -1.9,1.4 -2.9,2.1v166.1C583.2,218.7 589.7,225.2 597.6,225.2z"
android:fillColor="#80868B"/>
<path
android:pathData="M688,207.8h-47.8c-1.1,0 -2,0.9 -2,2s0.9,2 2,2H688c1.1,0 2,-0.9 2,-2S689.1,207.8 688,207.8z"
android:fillColor="#80868B"/>
<path
android:pathData="M656.5,205.6v-11.4h4.9l-6.9,-12.2l-6.9,12.2h4.9v11.4c-1.9,0.8 -3.2,2.6 -3.2,4.8c0,2.9 2.3,5.2 5.2,5.2c2.9,0 5.2,-2.3 5.2,-5.2C659.7,208.3 658.3,206.4 656.5,205.6z"
android:fillColor="#669DF6"/>
<path
android:pathData="M675.8,205.6v-11.4h4.9l-6.9,-12.2l-6.9,12.2h4.9v11.4c-1.9,0.8 -3.2,2.6 -3.2,4.8c0,2.9 2.3,5.2 5.2,5.2c2.9,0 5.2,-2.3 5.2,-5.2C679,208.3 677.7,206.4 675.8,205.6z"
android:fillColor="#669DF6"/>
<path
android:pathData="M664.2,19c35,0 67.9,13.6 92.6,38.4c24.7,24.7 38.4,57.6 38.4,92.6s-13.6,67.9 -38.4,92.6c-24.7,24.7 -57.6,38.4 -92.6,38.4s-67.9,-13.6 -92.6,-38.4c-24.7,-24.8 -38.4,-57.7 -38.4,-92.7s13.6,-67.9 38.4,-92.6C596.3,32.6 629.2,19 664.2,19M664.2,17c-73.4,0 -133,59.5 -133,132.9s59.5,132.9 132.9,132.9s133,-59.5 133,-132.9S737.6,17 664.2,17L664.2,17z"
android:fillColor="#3C4043"/>
<path
android:pathData="M384.2,300H27.8C12.5,300 0,287.2 0,271.5v-243C0,12.8 12.5,0 27.8,0h356.5C399.5,0 412,12.8 412,28.5v243.2C412,287.2 399.5,300 384.2,300z"
android:fillColor="#FFFFFF"/>
<path
android:pathData="M139.4,225.3h133.1c8,0 14.5,-6.5 14.5,-14.5V69c1.6,0 2.9,-1.3 2.9,-2.9v-17c-1.9,-1.6 -3.8,-3.2 -5.8,-4.7v166.4c0,6.4 -5.2,11.6 -11.6,11.6H139.4c-6.4,0 -11.6,-5.2 -11.6,-11.6V42.7c-1,0.7 -1.9,1.4 -2.9,2.1v166.1C125,218.8 131.5,225.3 139.4,225.3z"
android:fillColor="#DADCE0"/>
<path
android:pathData="M229.9,207.9h-47.8c-1.1,0 -2,0.9 -2,2s0.9,2 2,2h47.8c1.1,0 2,-0.9 2,-2S231,207.9 229.9,207.9z"
android:fillColor="#DADCE0"/>
<path
android:pathData="M198.4,205.7v-11.4h4.9l-6.9,-12.2l-6.9,12.2h4.9v11.4c-1.9,0.8 -3.2,2.6 -3.2,4.8c0,2.9 2.3,5.2 5.2,5.2s5.2,-2.3 5.2,-5.2C201.5,208.4 200.1,206.5 198.4,205.7z"
android:fillColor="#1A73E8"/>
<path
android:pathData="M217.6,205.7v-11.4h4.9l-6.9,-12.2l-6.9,12.2h4.9v11.4c-1.9,0.8 -3.2,2.6 -3.2,4.8c0,2.9 2.3,5.2 5.2,5.2s5.2,-2.3 5.2,-5.2C220.9,208.4 219.5,206.5 217.6,205.7z"
android:fillColor="#1A73E8"/>
<path
android:pathData="M206.1,19.1c35,0 67.9,13.6 92.6,38.4c24.7,24.7 38.4,57.6 38.4,92.6s-13.6,67.9 -38.4,92.6c-24.7,24.7 -57.6,38.4 -92.6,38.4s-67.9,-13.6 -92.6,-38.4S75.1,185 75.1,150s13.6,-67.9 38.4,-92.6C138.2,32.7 171.1,19.1 206.1,19.1M206.1,17.1c-73.4,0 -133,59.5 -133,132.9S132.6,282.9 206,282.9S339,223.4 339,150S279.5,17.1 206.1,17.1L206.1,17.1z"
android:fillColor="#E8EAED"/>
</vector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

View File

@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2021 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="412dp"
android:height="300dp"
android:viewportWidth="412"
android:viewportHeight="300">
<path
android:pathData="M384.2,300H27.8C12.5,300 0,287.2 0,271.5v-243C0,12.8 12.5,0 27.8,0h356.5C399.5,0 412,12.8 412,28.5v243.2C412,287.2 399.5,300 384.2,300z"
android:fillColor="#FFFFFF"/>
<path
android:pathData="M138,225.3h133.1c8,0 14.5,-6.5 14.5,-14.5V69c1.6,0 2.9,-1.3 2.9,-2.9V45.7c-1.9,-1.5 -3.8,-2.9 -5.8,-4.3v169.4c0,6.4 -5.2,11.6 -11.6,11.6H138c-6.4,0 -11.6,-5.2 -11.6,-11.6V43.5c-1,0.7 -1.9,1.5 -2.9,2.2v165C123.5,218.8 130,225.3 138,225.3z"
android:fillColor="#DADCE0"/>
<path
android:pathData="M206,283.9c-73.9,0 -133.9,-60.1 -133.9,-133.9S132.1,16.1 206,16.1c73.9,0 133.9,60.1 133.9,133.9S279.9,283.9 206,283.9zM206,18.1C133.2,18.1 74.1,77.2 74.1,150S133.2,281.9 206,281.9S337.9,222.8 337.9,150S278.8,18.1 206,18.1z"
android:fillColor="#E8EAED"/>
<path
android:pathData="M229.9,207.9h-47.8c-1.1,0 -2,0.9 -2,2s0.9,2 2,2h47.8c1.1,0 2,-0.9 2,-2S231,207.9 229.9,207.9z"
android:fillColor="#DADCE0"/>
<path
android:pathData="M190.9,205.7v-11.4h4.9l-6.9,-12.2l-6.9,12.2h4.9v11.4c-1.9,0.8 -3.2,2.6 -3.2,4.8c0,2.9 2.3,5.2 5.2,5.2c2.9,0 5.2,-2.3 5.2,-5.2C194.1,208.4 192.8,206.5 190.9,205.7z"
android:fillColor="#1A73E8"/>
<path
android:pathData="M208,205.7v-11.4h4.9l-6.9,-12.2l-6.9,12.2h4.9v11.4c-1.9,0.8 -3.2,2.6 -3.2,4.8c0,2.9 2.3,5.2 5.2,5.2c2.9,0 5.2,-2.3 5.2,-5.2C211.2,208.4 209.9,206.5 208,205.7z"
android:fillColor="#1A73E8"/>
<path
android:pathData="M225.1,205.7v-11.4h4.9l-6.9,-12.2l-6.9,12.2h4.9v11.4c-1.9,0.8 -3.2,2.6 -3.2,4.8c0,2.9 2.3,5.2 5.2,5.2c2.9,0 5.2,-2.3 5.2,-5.2C228.2,208.4 226.9,206.5 225.1,205.7z"
android:fillColor="#1A73E8"/>
</vector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

View File

@@ -53,11 +53,9 @@
</LinearLayout>
<ImageView
android:id="@+id/image"
android:layout_width="@dimen/accessibility_imageview_size"
android:layout_height="@dimen/accessibility_imageview_size"
android:layout_marginStart="44dp"
android:scaleType="fitCenter" />
<include layout="@layout/accessibility_lottie_animation_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="44dp"/>
</LinearLayout>

View File

@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2021 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
-->
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/illustration_frame"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/image_background"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxHeight="@dimen/accessibility_imageview_size"
android:src="@drawable/protection_background"
android:adjustViewBounds="true"/>
<com.airbnb.lottie.LottieAnimationView
android:id="@+id/image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxHeight="@dimen/accessibility_imageview_size"
android:adjustViewBounds="true"/>
</FrameLayout>

File diff suppressed because it is too large Load Diff

View File

@@ -31,6 +31,7 @@ import android.text.SpannableStringBuilder;
import android.text.TextUtils;
import android.text.method.LinkMovementMethod;
import android.text.style.ImageSpan;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.AbsListView;
@@ -44,9 +45,11 @@ import android.widget.ScrollView;
import android.widget.TextView;
import androidx.annotation.ColorInt;
import androidx.annotation.DrawableRes;
import androidx.annotation.IntDef;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RawRes;
import androidx.appcompat.app.AlertDialog;
import androidx.core.content.ContextCompat;
@@ -54,6 +57,9 @@ import com.android.settings.R;
import com.android.settings.core.SubSettingLauncher;
import com.android.settings.utils.AnnotationSpan;
import com.airbnb.lottie.LottieAnimationView;
import com.airbnb.lottie.LottieDrawable;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.List;
@@ -63,6 +69,7 @@ import java.util.List;
* Utility class for creating the edit dialog.
*/
public class AccessibilityDialogUtils {
private static final String TAG = "AccessibilityDialogUtils";
/** Denotes the dialog emuns for show dialog. */
@Retention(RetentionPolicy.SOURCE)
@@ -315,9 +322,22 @@ public class AccessibilityDialogUtils {
}
private static void setupShortcutWidget(View view, CharSequence titleText,
CharSequence summaryText, int imageResId) {
CharSequence summaryText, @DrawableRes int imageResId) {
setupShortcutWidgetWithTitleAndSummary(view, titleText, summaryText);
setupShortcutWidgetWithImageResource(view, imageResId);
}
private static void setupShortcutWidgetWithImageRawResource(View view, CharSequence titleText,
CharSequence summaryText, @RawRes int imageRawResId) {
setupShortcutWidgetWithTitleAndSummary(view, titleText, summaryText);
setupShortcutWidgetWithImageRawResource(view, imageRawResId);
}
private static void setupShortcutWidgetWithTitleAndSummary(View view, CharSequence titleText,
CharSequence summaryText) {
final CheckBox checkBox = view.findViewById(R.id.checkbox);
checkBox.setText(titleText);
final TextView summary = view.findViewById(R.id.summary);
if (TextUtils.isEmpty(summaryText)) {
summary.setVisibility(View.GONE);
@@ -326,8 +346,23 @@ public class AccessibilityDialogUtils {
summary.setMovementMethod(LinkMovementMethod.getInstance());
summary.setFocusable(false);
}
final ImageView image = view.findViewById(R.id.image);
image.setImageResource(imageResId);
}
private static void setupShortcutWidgetWithImageResource(View view,
@DrawableRes int imageResId) {
final ImageView imageView = view.findViewById(R.id.image);
imageView.setImageResource(imageResId);
}
private static void setupShortcutWidgetWithImageRawResource(View view,
@RawRes int imageRawResId) {
final LottieAnimationView lottieView = view.findViewById(R.id.image);
lottieView.setFailureListener(
result -> Log.w(TAG, "Invalid image raw resource id: " + imageRawResId,
result));
lottieView.setAnimation(imageRawResId);
lottieView.setRepeatCount(LottieDrawable.INFINITE);
lottieView.playAnimation();
}
private static void initSoftwareShortcutForSUW(Context context, View view) {
@@ -361,7 +396,6 @@ public class AccessibilityDialogUtils {
R.string.accessibility_shortcut_edit_dialog_summary_hardware);
setupShortcutWidget(dialogView, title, summary,
R.drawable.accessibility_shortcut_type_hardware);
// TODO(b/142531156): Use vector drawable instead of temporal png file to avoid distorted.
}
private static void initMagnifyShortcut(Context context, View view) {
@@ -374,9 +408,8 @@ public class AccessibilityDialogUtils {
final Object[] arguments = {3};
summary = MessageFormat.format(summary, arguments);
setupShortcutWidget(dialogView, title, summary,
R.drawable.accessibility_shortcut_type_triple_tap);
// TODO(b/142531156): Use vector drawable instead of temporal png file to avoid distorted.
setupShortcutWidgetWithImageRawResource(dialogView, title, summary,
R.raw.accessibility_shortcut_type_triple_tap);
}
private static void initAdvancedWidget(View view) {

View File

@@ -352,7 +352,7 @@ public final class AccessibilityGestureNavigationTutorial {
final CharSequence title =
context.getText(R.string.accessibility_tutorial_dialog_title_triple);
final ImageView image =
createImageView(context, R.drawable.accessibility_shortcut_type_triple_tap);
createImageView(context, R.raw.accessibility_shortcut_type_triple_tap);
final CharSequence instruction =
context.getText(R.string.accessibility_tutorial_dialog_message_triple);
final ImageView indicatorIcon =