Android-x86
Fork
Donation

  • R/O
  • HTTP
  • SSH
  • HTTPS

frameworks-base: Commit

frameworks/base


Commit MetaInfo

Revision237353427fc3c0e66a66500b6c9745e6a5f48084 (tree)
Time2020-05-21 10:52:43
AuthorChih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Log Message

Fix ime_switcher icon misplaced

Copy code from Android 10.

Change Summary

Incremental Difference

--- /dev/null
+++ b/packages/SystemUI/res/layout/ime_switcher.xml
@@ -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+ />
--- a/packages/SystemUI/res/layout/menu_ime.xml
+++ b/packages/SystemUI/res/layout/menu_ime.xml
@@ -17,13 +17,13 @@
1717 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
1818 xmlns:systemui="http://schemas.android.com/apk/res-auto"
1919 android:id="@+id/menu_container"
20- android:layout_width="match_parent"
20+ android:layout_width="@dimen/navigation_key_width"
2121 android:layout_height="match_parent"
2222 android:importantForAccessibility="no"
2323 >
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. -->
2727
2828 <com.android.systemui.statusbar.policy.KeyButtonView
2929 android:id="@+id/menu"
@@ -35,13 +35,13 @@
3535 android:visibility="invisible"
3636 android:contentDescription="@string/accessibility_menu"
3737 />
38- <com.android.systemui.statusbar.policy.KeyButtonView
39- android:id="@+id/ime_switcher"
38+ <include layout="@layout/ime_switcher"
4039 android:layout_width="match_parent"
4140 android:layout_height="match_parent"
42- android:visibility="invisible"
43- android:contentDescription="@string/accessibility_ime_switch_button"
4441 android:scaleType="centerInside"
42+ android:visibility="invisible"
43+ android:paddingStart="0dp"
44+ android:paddingEnd="0dp"
4545 />
4646 <com.android.systemui.statusbar.policy.KeyButtonView
4747 android:id="@+id/rotate_suggestion"
Show on old repository browser