Skip to content

Commit aa18934

Browse files
Menghan LiAndroid (Google) Code Review
authored andcommitted
Merge "fix(tablet assets): update a11y button navigation asset for tablets" into tm-qpr-dev
2 parents 4466066 + e1ce633 commit aa18934

File tree

5 files changed

+113
-2
lines changed

5 files changed

+113
-2
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Copyright (C) 2023 The Android Open Source Project
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
-->
16+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
17+
android:width="412dp"
18+
android:height="300dp"
19+
android:viewportWidth="412"
20+
android:viewportHeight="300">
21+
<path
22+
android:pathData="M28,0L384,0A28,28 0,0 1,412 28L412,272A28,28 0,0 1,384 300L28,300A28,28 0,0 1,0 272L0,28A28,28 0,0 1,28 0z"
23+
android:fillColor="#000000"/>
24+
<group>
25+
<clip-path
26+
android:pathData="M62.23,50.19L349.77,50.19A16,16 0,0 1,365.77 66.19L365.77,236.14A16,16 0,0 1,349.77 252.14L62.23,252.14A16,16 0,0 1,46.23 236.14L46.23,66.19A16,16 0,0 1,62.23 50.19z"/>
27+
<path
28+
android:pathData="M46.23,204.14h320v48h-320z"
29+
android:fillColor="#3D4043"/>
30+
<path
31+
android:pathData="M268.93,214.14C270.43,214.14 271.63,215.34 271.63,216.84C271.63,218.34 270.43,219.54 268.93,219.54C267.43,219.54 266.23,218.34 266.23,216.84C266.23,215.34 267.43,214.14 268.93,214.14ZM273.03,223.64V241.24H270.23V233.14H267.53V241.24H264.83V223.64C262.13,223.44 259.23,222.94 256.73,222.24L257.43,219.54C260.93,220.44 265.13,220.94 268.93,220.94C272.73,220.94 276.93,220.54 280.43,219.54L281.13,222.24C278.63,222.94 275.73,223.44 273.03,223.64Z"
32+
android:fillColor="#ffffff"/>
33+
<path
34+
android:pathData="M206.23,238.04C211.42,238.04 215.63,233.83 215.63,228.64C215.63,223.45 211.42,219.24 206.23,219.24C201.04,219.24 196.83,223.45 196.83,228.64C196.83,233.83 201.04,238.04 206.23,238.04Z"
35+
android:fillColor="#808589"/>
36+
<path
37+
android:pathData="M131.33,228.64L147.33,237.84V219.34L131.33,228.64Z"
38+
android:fillColor="#808589"/>
39+
</group>
40+
<path
41+
android:pathData="M62.23,51.69L349.77,51.69A14.5,14.5 0,0 1,364.27 66.19L364.27,236.14A14.5,14.5 0,0 1,349.77 250.64L62.23,250.64A14.5,14.5 0,0 1,47.73 236.14L47.73,66.19A14.5,14.5 0,0 1,62.23 51.69z"
42+
android:strokeWidth="3"
43+
android:fillColor="#00000000"
44+
android:strokeColor="#80868B"/>
45+
<path
46+
android:pathData="M311.45,50.35C311.45,48.98 312.56,47.87 313.92,47.87L322.84,47.87C324.2,47.87 325.32,48.98 325.32,50.35L319.37,51.34L311.45,50.35Z"
47+
android:fillColor="#80868B"/>
48+
<path
49+
android:pathData="M263.59,50.35C263.59,48.98 264.7,47.87 266.06,47.87L287.85,47.87C289.22,47.87 290.33,48.98 290.33,50.35L277.45,51.34L263.59,50.35Z"
50+
android:fillColor="#80868B"/>
51+
<path
52+
android:pathData="M268.93,259.69C251.31,259.69 236.93,245.3 236.93,227.69C236.93,210.07 251.31,195.69 268.93,195.69C286.55,195.69 300.93,210.07 300.93,227.69C300.93,245.3 286.55,259.69 268.93,259.69ZM268.93,198.38C252.84,198.38 239.72,211.51 239.72,227.6C239.72,243.69 252.84,256.81 268.93,256.81C285.02,256.81 298.14,243.69 298.14,227.6C298.14,211.51 285.02,198.38 268.93,198.38Z"
53+
android:fillColor="#729CEE"/>
54+
</vector>
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Copyright (C) 2023 The Android Open Source Project
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
-->
16+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
17+
android:width="412dp"
18+
android:height="300dp"
19+
android:viewportWidth="412"
20+
android:viewportHeight="300">
21+
<path
22+
android:pathData="M28,0L384,0A28,28 0,0 1,412 28L412,272A28,28 0,0 1,384 300L28,300A28,28 0,0 1,0 272L0,28A28,28 0,0 1,28 0z"
23+
android:fillColor="#ffffff"/>
24+
<group>
25+
<clip-path
26+
android:pathData="M62.23,50.19L349.77,50.19A16,16 0,0 1,365.77 66.19L365.77,236.14A16,16 0,0 1,349.77 252.14L62.23,252.14A16,16 0,0 1,46.23 236.14L46.23,66.19A16,16 0,0 1,62.23 50.19z"/>
27+
<path
28+
android:pathData="M46.23,204.14h320v48h-320z"
29+
android:fillColor="#000000"/>
30+
<path
31+
android:pathData="M268.93,214.14C270.43,214.14 271.63,215.34 271.63,216.84C271.63,218.34 270.43,219.54 268.93,219.54C267.43,219.54 266.23,218.34 266.23,216.84C266.23,215.34 267.43,214.14 268.93,214.14ZM273.03,223.64V241.24H270.23V233.14H267.53V241.24H264.83V223.64C262.13,223.44 259.23,222.94 256.73,222.24L257.43,219.54C260.93,220.44 265.13,220.94 268.93,220.94C272.73,220.94 276.93,220.54 280.43,219.54L281.13,222.24C278.63,222.94 275.73,223.44 273.03,223.64Z"
32+
android:fillColor="#ffffff"/>
33+
<path
34+
android:pathData="M206.23,238.04C211.42,238.04 215.63,233.83 215.63,228.64C215.63,223.45 211.42,219.24 206.23,219.24C201.04,219.24 196.83,223.45 196.83,228.64C196.83,233.83 201.04,238.04 206.23,238.04Z"
35+
android:fillColor="#BDC0C4"/>
36+
<path
37+
android:pathData="M131.33,228.64L147.33,237.84V219.34L131.33,228.64Z"
38+
android:fillColor="#BDC0C4"/>
39+
</group>
40+
<path
41+
android:pathData="M62.23,51.69L349.77,51.69A14.5,14.5 0,0 1,364.27 66.19L364.27,236.14A14.5,14.5 0,0 1,349.77 250.64L62.23,250.64A14.5,14.5 0,0 1,47.73 236.14L47.73,66.19A14.5,14.5 0,0 1,62.23 51.69z"
42+
android:strokeWidth="3"
43+
android:fillColor="#00000000"
44+
android:strokeColor="#DADCE0"/>
45+
<path
46+
android:pathData="M311.45,50.35C311.45,48.98 312.56,47.87 313.92,47.87L322.84,47.87C324.2,47.87 325.32,48.98 325.32,50.35L319.37,51.34L311.45,50.35Z"
47+
android:fillColor="#DADCE0"/>
48+
<path
49+
android:pathData="M263.59,50.35C263.59,48.98 264.7,47.87 266.06,47.87L287.85,47.87C289.22,47.87 290.33,48.98 290.33,50.35L277.45,51.34L263.59,50.35Z"
50+
android:fillColor="#DADCE0"/>
51+
<path
52+
android:pathData="M268.93,259.69C251.31,259.69 236.93,245.3 236.93,227.69C236.93,210.07 251.31,195.69 268.93,195.69C286.55,195.69 300.93,210.07 300.93,227.69C300.93,245.3 286.55,259.69 268.93,259.69ZM268.93,198.38C252.84,198.38 239.72,211.51 239.72,227.6C239.72,243.69 252.84,256.81 268.93,256.81C285.02,256.81 298.14,243.69 298.14,227.6C298.14,211.51 285.02,198.38 268.93,198.38Z"
53+
android:fillColor="#729CEE"/>
54+
</vector>

res/values/drawables.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@
3232
<drawable name="a11y_button_preview_two_finger" product="default">@drawable/accessibility_button_preview_two_finger</drawable>
3333
<drawable name="a11y_button_preview_two_finger" product="tablet">@drawable/accessibility_button_preview_two_finger_tablet</drawable>
3434

35+
<drawable name="a11y_button_navigation" product="default">@drawable/accessibility_button_navigation</drawable>
36+
<drawable name="a11y_button_navigation" product="tablet">@drawable/accessibility_button_navigation_tablet</drawable>
37+
3538
<drawable name="a11y_captioning_banner" product="default">@drawable/accessibility_captioning_banner</drawable>
3639
<drawable name="a11y_captioning_banner" product="tablet">@drawable/accessibility_captioning_banner_tablet</drawable>
3740

src/com/android/settings/accessibility/AccessibilityButtonPreviewPreferenceController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ private void updatePreviewPreference() {
122122
: R.drawable.a11y_button_preview_two_finger));
123123
} else {
124124
mIllustrationPreference.setImageDrawable(
125-
mContext.getDrawable(R.drawable.accessibility_button_navigation));
125+
mContext.getDrawable(R.drawable.a11y_button_navigation));
126126
}
127127
}
128128

tests/robotests/src/com/android/settings/accessibility/AccessibilityButtonPreviewPreferenceControllerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public void onChange_a11yBtnModeNavigationBar_getNavigationBarDrawable() {
7474
mController.mContentObserver.onChange(false);
7575

7676
final Drawable navigationBarDrawable = mContext.getDrawable(
77-
R.drawable.accessibility_button_navigation);
77+
R.drawable.a11y_button_navigation);
7878
assertThat(drawableToBitmap(mController.mIllustrationPreference.getImageDrawable()).sameAs(
7979
drawableToBitmap(navigationBarDrawable))).isTrue();
8080
}

0 commit comments

Comments
 (0)