1<?xml version="1.0" encoding="utf-8"?><!-- 2 Copyright (C) 2020 The Android Open Source Project 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15--> 16<!-- Updates layout's color and background in {@code BottomActionBar} --> 17<RelativeLayout 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="wrap_content" 22 android:clipChildren="false"> 23 24 <!-- Bottom Sheet --> 25 <androidx.coordinatorlayout.widget.CoordinatorLayout 26 android:layout_width="match_parent" 27 android:layout_height="wrap_content" 28 android:layout_above="@id/action_tabs"> 29 <!-- Bottom sheet view should be a child view of CoordinatorLayout --> 30 <FrameLayout 31 android:id="@+id/action_bottom_sheet" 32 android:layout_width="match_parent" 33 android:layout_height="wrap_content" 34 android:layout_marginHorizontal="@dimen/bottom_sheet_margin" 35 android:theme="@style/WallpaperPicker.BottomPaneStyle" 36 android:clickable="true" 37 app:behavior_peekHeight="0dp" 38 app:layout_behavior="com.android.wallpaper.widget.BottomActionBar$QueueStateBottomSheetBehavior" /> 39 </androidx.coordinatorlayout.widget.CoordinatorLayout> 40 41 <!-- Bottom Tabs --> 42 <androidx.constraintlayout.widget.ConstraintLayout 43 android:id="@+id/action_tabs" 44 android:layout_width="match_parent" 45 android:layout_height="@dimen/bottom_actions_height" 46 android:layout_alignParentBottom="true" 47 android:layout_marginHorizontal="@dimen/bottom_actions_horizontal_margin" 48 android:layoutDirection="locale" 49 android:clipToPadding="false" 50 android:paddingBottom="@dimen/bottom_actions_bottom_padding" 51 android:paddingTop="@dimen/bottom_actions_top_padding" 52 android:theme="@style/BottomActionItemStyle"> 53 54 <ImageView 55 android:id="@+id/action_back" 56 android:layout_width="@dimen/bottom_action_button_width" 57 android:layout_height="@dimen/bottom_action_button_height" 58 android:src="@drawable/ic_close_gm2_24px" 59 android:contentDescription="@string/bottom_action_bar_back" 60 android:visibility="gone" 61 app:layout_constraintTop_toTopOf="parent" 62 app:layout_constraintBottom_toBottomOf="parent" 63 app:layout_constraintEnd_toStartOf="@id/action_rotation" 64 app:layout_constraintHorizontal_chainStyle="spread_inside" 65 app:layout_constraintStart_toStartOf="parent" /> 66 67 <ImageView 68 android:id="@+id/action_rotation" 69 android:layout_width="@dimen/bottom_action_button_width" 70 android:layout_height="@dimen/bottom_action_button_height" 71 android:src="@drawable/ic_slideshow_24dp" 72 android:contentDescription="@string/bottom_action_bar_slideshow_wallpaper" 73 android:visibility="gone" 74 app:layout_constraintTop_toTopOf="parent" 75 app:layout_constraintBottom_toBottomOf="parent" 76 app:layout_constraintEnd_toStartOf="@id/action_delete" 77 app:layout_constraintStart_toEndOf="@id/action_back" /> 78 79 <ImageView 80 android:id="@+id/action_delete" 81 android:layout_width="@dimen/bottom_action_button_width" 82 android:layout_height="@dimen/bottom_action_button_height" 83 android:contentDescription="@string/delete_live_wallpaper" 84 android:src="@drawable/ic_delete_24px" 85 android:visibility="gone" 86 app:layout_constraintTop_toTopOf="parent" 87 app:layout_constraintBottom_toBottomOf="parent" 88 app:layout_constraintEnd_toStartOf="@id/action_information" 89 app:layout_constraintStart_toEndOf="@id/action_rotation" /> 90 91 <ImageView 92 android:id="@+id/action_information" 93 android:layout_width="@dimen/bottom_action_button_width" 94 android:layout_height="@dimen/bottom_action_button_height" 95 android:src="@drawable/ic_info_gm2_24px" 96 android:contentDescription="@string/tab_info" 97 android:visibility="gone" 98 app:layout_constraintTop_toTopOf="parent" 99 app:layout_constraintBottom_toBottomOf="parent" 100 app:layout_constraintEnd_toStartOf="@id/action_edit" 101 app:layout_constraintStart_toEndOf="@id/action_delete" /> 102 103 <ImageView 104 android:id="@+id/action_edit" 105 android:layout_width="@dimen/bottom_action_button_width" 106 android:layout_height="@dimen/bottom_action_button_height" 107 android:src="@drawable/ic_pan_zoom_24dp" 108 android:contentDescription="@string/bottom_action_bar_edit" 109 android:visibility="gone" 110 app:layout_constraintTop_toTopOf="parent" 111 app:layout_constraintBottom_toBottomOf="parent" 112 app:layout_constraintEnd_toStartOf="@id/action_customize" 113 app:layout_constraintStart_toEndOf="@id/action_information" /> 114 115 <ImageView 116 android:id="@+id/action_customize" 117 android:layout_width="@dimen/bottom_action_button_width" 118 android:layout_height="@dimen/bottom_action_button_height" 119 android:src="@drawable/ic_tune_black_24dp" 120 android:contentDescription="@string/tab_customize" 121 android:visibility="gone" 122 app:layout_constraintTop_toTopOf="parent" 123 app:layout_constraintBottom_toBottomOf="parent" 124 app:layout_constraintEnd_toStartOf="@id/action_download" 125 app:layout_constraintStart_toEndOf="@id/action_edit" /> 126 127 <ImageView 128 android:id="@+id/action_download" 129 android:layout_width="@dimen/bottom_action_button_width" 130 android:layout_height="@dimen/bottom_action_button_height" 131 android:src="@drawable/ic_file_download_gm2_24px" 132 android:contentDescription="@string/bottom_action_bar_download" 133 android:visibility="gone" 134 app:layout_constraintTop_toTopOf="parent" 135 app:layout_constraintBottom_toBottomOf="parent" 136 app:layout_constraintEnd_toStartOf="@id/action_progress" 137 app:layout_constraintStart_toEndOf="@id/action_customize" /> 138 139 <ProgressBar 140 android:id="@+id/action_progress" 141 android:layout_width="@dimen/bottom_action_button_width" 142 android:layout_height="@dimen/bottom_action_button_height" 143 android:visibility="gone" 144 app:layout_constraintTop_toTopOf="parent" 145 app:layout_constraintBottom_toBottomOf="parent" 146 app:layout_constraintEnd_toStartOf="@id/action_apply" 147 app:layout_constraintStart_toEndOf="@id/action_download" /> 148 149 <ImageView 150 android:id="@+id/action_apply" 151 android:layout_width="@dimen/bottom_action_button_width" 152 android:layout_height="@dimen/bottom_action_button_height" 153 android:src="@drawable/ic_done_gm2_24px" 154 android:contentDescription="@string/bottom_action_bar_apply" 155 android:visibility="gone" 156 app:layout_constraintTop_toTopOf="parent" 157 app:layout_constraintBottom_toBottomOf="parent" 158 app:layout_constraintEnd_toStartOf="@id/action_apply_text_button" 159 app:layout_constraintStart_toEndOf="@id/action_progress"/> 160 161 <Button 162 android:id="@+id/action_apply_text_button" 163 android:layout_width="wrap_content" 164 android:layout_height="wrap_content" 165 android:layout_gravity="center" 166 android:background="@drawable/bottom_apply_button_background" 167 android:minHeight="0dp" 168 android:minWidth="0dp" 169 android:padding="0dp" 170 android:text="@string/bottom_action_bar_apply" 171 android:textColor="?android:textColorPrimaryInverse" 172 android:visibility="gone" 173 app:layout_constraintBottom_toBottomOf="parent" 174 app:layout_constraintEnd_toEndOf="parent" 175 app:layout_constraintStart_toEndOf="@id/action_apply" 176 app:layout_constraintTop_toTopOf="parent" /> 177 178 </androidx.constraintlayout.widget.ConstraintLayout> 179</RelativeLayout> 180