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:clipToPadding="false" 48 android:layoutDirection="locale" 49 android:paddingBottom="@dimen/bottom_actions_bottom_padding" 50 android:paddingHorizontal="@dimen/bottom_actions_horizontal_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:contentDescription="@string/bottom_action_bar_back" 59 android:src="@drawable/ic_close_gm2_24px" 60 android:visibility="gone" 61 app:layout_constraintBottom_toBottomOf="parent" 62 app:layout_constraintEnd_toStartOf="@id/action_rotation" 63 app:layout_constraintHorizontal_chainStyle="spread_inside" 64 app:layout_constraintStart_toStartOf="parent" 65 app:layout_constraintTop_toTopOf="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_effects" 125 app:layout_constraintStart_toEndOf="@id/action_edit" /> 126 127 <ImageView 128 android:id="@+id/action_effects" 129 android:layout_width="@dimen/bottom_action_button_width" 130 android:layout_height="@dimen/bottom_action_button_height" 131 android:src="@drawable/ic_effect_black_24dp" 132 android:contentDescription="@string/tab_effects" 133 android:visibility="gone" 134 app:layout_constraintTop_toTopOf="parent" 135 app:layout_constraintBottom_toBottomOf="parent" 136 app:layout_constraintEnd_toStartOf="@id/action_download" 137 app:layout_constraintStart_toEndOf="@id/action_customize" /> 138 139 <ImageView 140 android:id="@+id/action_download" 141 android:layout_width="@dimen/bottom_action_button_width" 142 android:layout_height="@dimen/bottom_action_button_height" 143 android:src="@drawable/ic_file_download_gm2_24px" 144 android:contentDescription="@string/bottom_action_bar_download" 145 android:visibility="gone" 146 app:layout_constraintTop_toTopOf="parent" 147 app:layout_constraintBottom_toBottomOf="parent" 148 app:layout_constraintEnd_toStartOf="@id/action_progress" 149 app:layout_constraintStart_toEndOf="@id/action_effects" /> 150 151 <ProgressBar 152 android:id="@+id/action_progress" 153 android:layout_width="@dimen/bottom_action_button_width" 154 android:layout_height="@dimen/bottom_action_button_height" 155 android:visibility="gone" 156 app:layout_constraintTop_toTopOf="parent" 157 app:layout_constraintBottom_toBottomOf="parent" 158 app:layout_constraintEnd_toStartOf="@id/action_apply" 159 app:layout_constraintStart_toEndOf="@id/action_download" /> 160 161 <ImageView 162 android:id="@+id/action_apply" 163 android:layout_width="@dimen/bottom_action_button_width" 164 android:layout_height="@dimen/bottom_action_button_height" 165 android:src="@drawable/ic_done_gm2_24px" 166 android:contentDescription="@string/bottom_action_bar_apply" 167 android:visibility="gone" 168 app:layout_constraintTop_toTopOf="parent" 169 app:layout_constraintBottom_toBottomOf="parent" 170 app:layout_constraintEnd_toStartOf="@id/action_apply_text_button" 171 app:layout_constraintStart_toEndOf="@id/action_progress"/> 172 173 <Button 174 android:id="@+id/action_apply_text_button" 175 android:layout_width="wrap_content" 176 android:layout_height="wrap_content" 177 android:layout_gravity="center" 178 android:background="@drawable/bottom_apply_button_background" 179 android:minHeight="@dimen/bottom_action_button_height" 180 android:minWidth="@dimen/bottom_action_button_wide_width" 181 android:padding="0dp" 182 android:text="@string/bottom_action_bar_apply" 183 android:textColor="?android:textColorPrimaryInverse" 184 android:visibility="gone" 185 app:layout_constraintBottom_toBottomOf="parent" 186 app:layout_constraintEnd_toEndOf="parent" 187 app:layout_constraintStart_toEndOf="@id/action_apply" 188 app:layout_constraintTop_toTopOf="parent" /> 189 190 </androidx.constraintlayout.widget.ConstraintLayout> 191</RelativeLayout> 192