frameworks/base
Révision | 237353427fc3c0e66a66500b6c9745e6a5f48084 (tree) |
---|---|
l'heure | 2020-05-21 10:52:43 |
Auteur | Chih-Wei Huang <cwhuang@linu...> |
Commiter | Chih-Wei Huang |
Fix ime_switcher icon misplaced
Copy code from Android 10.
@@ -0,0 +1,28 @@ | ||
1 | +<?xml version="1.0" encoding="utf-8"?> | |
2 | +<!-- | |
3 | + ~ Copyright (C) 2019 The Android Open Source Project | |
4 | + ~ | |
5 | + ~ Licensed under the Apache License, Version 2.0 (the "License"); | |
6 | + ~ you may not use this file except in compliance with the License. | |
7 | + ~ You may obtain a copy of the License at | |
8 | + ~ | |
9 | + ~ http://www.apache.org/licenses/LICENSE-2.0 | |
10 | + ~ | |
11 | + ~ Unless required by applicable law or agreed to in writing, software | |
12 | + ~ distributed under the License is distributed on an "AS IS" BASIS, | |
13 | + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
14 | + ~ See the License for the specific language governing permissions and | |
15 | + ~ limitations under the License | |
16 | + --> | |
17 | + | |
18 | +<com.android.systemui.statusbar.policy.KeyButtonView | |
19 | + xmlns:android="http://schemas.android.com/apk/res/android" | |
20 | + android:id="@+id/ime_switcher" | |
21 | + android:layout_width="@dimen/navigation_key_width" | |
22 | + android:layout_height="match_parent" | |
23 | + android:layout_weight="0" | |
24 | + android:contentDescription="@string/accessibility_ime_switch_button" | |
25 | + android:scaleType="center" | |
26 | + android:paddingStart="@dimen/navigation_key_padding" | |
27 | + android:paddingEnd="@dimen/navigation_key_padding" | |
28 | + /> |
@@ -17,13 +17,13 @@ | ||
17 | 17 | <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" |
18 | 18 | xmlns:systemui="http://schemas.android.com/apk/res-auto" |
19 | 19 | android:id="@+id/menu_container" |
20 | - android:layout_width="match_parent" | |
20 | + android:layout_width="@dimen/navigation_key_width" | |
21 | 21 | android:layout_height="match_parent" |
22 | 22 | android:importantForAccessibility="no" |
23 | 23 | > |
24 | - <!-- Use width & height=match_parent for parent FrameLayout and buttons because they are placed | |
25 | - inside a view that has a size controlled by weight. Ensure weight is large enough to support | |
26 | - icon size. --> | |
24 | + <!-- Use nav button width & height=match_parent for parent FrameLayout and buttons because they | |
25 | + are placed inside a view that has a size controlled by weight. Ensure weight is large enough to | |
26 | + support icon size. --> | |
27 | 27 | |
28 | 28 | <com.android.systemui.statusbar.policy.KeyButtonView |
29 | 29 | android:id="@+id/menu" |
@@ -35,13 +35,13 @@ | ||
35 | 35 | android:visibility="invisible" |
36 | 36 | android:contentDescription="@string/accessibility_menu" |
37 | 37 | /> |
38 | - <com.android.systemui.statusbar.policy.KeyButtonView | |
39 | - android:id="@+id/ime_switcher" | |
38 | + <include layout="@layout/ime_switcher" | |
40 | 39 | android:layout_width="match_parent" |
41 | 40 | android:layout_height="match_parent" |
42 | - android:visibility="invisible" | |
43 | - android:contentDescription="@string/accessibility_ime_switch_button" | |
44 | 41 | android:scaleType="centerInside" |
42 | + android:visibility="invisible" | |
43 | + android:paddingStart="0dp" | |
44 | + android:paddingEnd="0dp" | |
45 | 45 | /> |
46 | 46 | <com.android.systemui.statusbar.policy.KeyButtonView |
47 | 47 | android:id="@+id/rotate_suggestion" |