1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 ~ Copyright (C) 2021 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<FrameLayout 18 xmlns:android="http://schemas.android.com/apk/res/android" 19 xmlns:app="http://schemas.android.com/apk/res-auto" 20 android:layout_width="match_parent" 21 android:layout_height="match_parent"> 22 23 <!-- The nested scroll view holds the layout that is made visible when 24 the picker is empty. It has been wrapped in the scroll view to tackle 25 bugs where the "empty_text_view" gets rolled off the screen partially 26 or completely in small screen devices --> 27 <androidx.core.widget.NestedScrollView 28 android:id="@android:id/empty" 29 android:layout_width="match_parent" 30 android:layout_height="wrap_content" 31 android:layout_marginTop="80dp" 32 android:visibility="gone"> 33 34 <LinearLayout 35 android:layout_width="match_parent" 36 android:layout_height="wrap_content" 37 android:orientation="vertical"> 38 39 <ImageView 40 android:layout_width="wrap_content" 41 android:layout_height="wrap_content" 42 android:layout_gravity="center_horizontal" 43 android:scaleType="fitCenter" 44 android:src="@drawable/ic_artwork_camera" 45 android:contentDescription="@null"/> 46 47 <TextView 48 android:id="@+id/empty_text_view" 49 android:layout_width="match_parent" 50 android:layout_height="wrap_content" 51 android:layout_marginTop="@dimen/picker_empty_text_margin" 52 android:gravity="center_horizontal" 53 android:text="@string/picker_photos_empty_message" 54 android:textColor="?android:attr/textColorSecondary" 55 android:textSize="@dimen/picker_empty_text_size" 56 style="?android:attr/textAppearanceListItem"/> 57 58 </LinearLayout> 59 60 </androidx.core.widget.NestedScrollView> 61 62 <com.android.providers.media.photopicker.ui.AutoFitRecyclerView 63 android:id="@+id/picker_tab_recyclerview" 64 android:layout_width="match_parent" 65 android:layout_height="match_parent" 66 android:clipToPadding="false" 67 android:drawSelectorOnTop="true" 68 android:overScrollMode="never"/> 69 70 <TextView 71 android:id="@+id/loading_text_view" 72 android:layout_width="match_parent" 73 android:layout_height="wrap_content" 74 android:gravity="center_horizontal" 75 android:text="@string/picker_loading_photos_message" 76 android:textColor="?android:attr/textColorPrimary" 77 android:textSize="@dimen/picker_tab_loading_message_text_size" 78 style="?android:attr/textAppearanceListItem" 79 android:visibility="gone"/> 80 81 <ProgressBar 82 android:id="@+id/progress_bar" 83 android:layout_width="match_parent" 84 android:layout_height="wrap_content" 85 android:layout_marginTop="@dimen/picker_progress_bar_margin_top" 86 style="@style/android:Widget.Material.ProgressBar.Horizontal" 87 android:indeterminate="true" 88 android:visibility="gone"/> 89 90</FrameLayout> 91