OSDN Git Service

Fix Weird floating "add language" item
authorRaff Tsai <rafftsai@google.com>
Mon, 4 Nov 2019 09:34:02 +0000 (17:34 +0800)
committerRaff Tsai <rafftsai@google.com>
Mon, 4 Nov 2019 09:34:02 +0000 (17:34 +0800)
- Base theme has android:clipToPadding=false attribute. It let user
UI draw under navigation bar but also cause this problem. Add
android:clipToPadding=true in layout to fix the problem.

Fixes: 142108980
Test: manual
Change-Id: Ibe60b348a3c7c01d9786612ceac23a47a78a208a

res/layout/locale_order_list.xml
res/layout/profile_select_tablayout.xml
res/layout/time_zone_items_list.xml [deleted file]
src/com/android/settings/datetime/timezone/BaseTimeZonePicker.java

index d096368..929582f 100644 (file)
@@ -23,6 +23,8 @@
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="match_parent"
+        android:clipToPadding="true"
+        android:clipChildren="true"
         android:orientation="vertical">
 
         <com.android.settings.localepicker.LocaleRecyclerView
index 4712c1d..8c0ca8c 100644 (file)
@@ -18,6 +18,8 @@
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:theme="@style/Theme.MaterialComponents.DayNight"
+    android:clipToPadding="true"
+    android:clipChildren="true"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:orientation="vertical">
diff --git a/res/layout/time_zone_items_list.xml b/res/layout/time_zone_items_list.xml
deleted file mode 100644 (file)
index 9c929ee..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright (C) 2018 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.
-  -->
-<androidx.recyclerview.widget.RecyclerView
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/recycler_view"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:scrollbars="vertical"/>
index 887b9f2..dca597f 100644 (file)
@@ -83,7 +83,7 @@ public abstract class BaseTimeZonePicker extends InstrumentedFragment
     @Override
     public View onCreateView(LayoutInflater inflater, ViewGroup container,
             Bundle savedInstanceState) {
-        final View view = inflater.inflate(R.layout.time_zone_items_list, container, false);
+        final View view = inflater.inflate(R.layout.recycler_view, container, false);
         mRecyclerView = view.findViewById(R.id.recycler_view);
         mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext(),
                 LinearLayoutManager.VERTICAL, /* reverseLayout */ false));