- 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
<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
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">
+++ /dev/null
-<?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"/>
@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));