1<?xml version="1.0" encoding="utf-8"?><!-- 2 Copyright (C) 2017 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 17<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 18 xmlns:app="http://schemas.android.com/apk/res-auto" 19 android:id="@+id/metadata" 20 android:layout_width="match_parent" 21 android:layout_height="wrap_content" 22 android:orientation="horizontal"> 23 24 <androidx.cardview.widget.CardView 25 android:layout_width="0dp" 26 android:layout_height="wrap_content" 27 android:layout_weight="1" 28 android:layout_marginHorizontal="4dp" 29 app:cardCornerRadius="?android:dialogCornerRadius" 30 app:cardElevation="@dimen/single_metadata_card_elevation" 31 app:cardMaxElevation="@dimen/single_metadata_card_elevation" 32 app:cardPreventCornerOverlap="false" 33 app:cardUseCompatPadding="true" 34 app:contentPadding="0dp"> 35 36 <LinearLayout 37 android:layout_width="match_parent" 38 android:layout_height="match_parent" 39 android:orientation="vertical"> 40 41 <!-- Wraps the image and the "lock screen" label overlapping it. --> 42 <FrameLayout 43 android:id="@+id/lock_wallpaper_section" 44 android:layout_width="match_parent" 45 android:layout_height="wrap_content"> 46 47 <com.android.wallpaper.widget.WallpaperThumbnailView 48 android:id="@+id/lock_wallpaper_image" 49 android:layout_width="match_parent" 50 android:layout_height="@dimen/both_metadata_thumb_height" 51 android:layout_gravity="top" 52 android:clickable="true" 53 android:contentDescription="@string/currently_set_lock_wallpaper_thumbnail" 54 android:focusable="true" 55 android:foreground="?attr/selectableItemBackground" 56 android:nextFocusForward="@+id/lock_wallpaper_attribution_section" /> 57 58 <ImageButton 59 style="?attr/borderlessButtonStyle" 60 android:id="@+id/lock_wallpaper_explore_button" 61 android:layout_width="wrap_content" 62 android:layout_height="wrap_content" 63 android:layout_margin="@dimen/single_metadata_explore_button_margin" 64 android:layout_gravity="top|end" 65 android:background="@drawable/button_over_thumbnail_background" 66 android:clickable="true" 67 android:contentDescription="@string/explore" 68 android:focusable="true" 69 android:padding="@dimen/single_metadata_explore_section_button_padding" 70 android:src="@drawable/ic_explore_24px" 71 android:visibility="gone" /> 72 </FrameLayout> 73 74 <!-- Wraps the attribution section. --> 75 <RelativeLayout 76 android:id="@id/lock_wallpaper_attribution_section" 77 android:layout_width="match_parent" 78 android:layout_height="@dimen/both_metadata_attribution_section_height" 79 android:layout_marginEnd="@dimen/single_metadata_pane_attributions_margin_right" 80 android:layout_marginStart="@dimen/single_metadata_pane_attributions_margin_left" 81 android:paddingBottom="@dimen/single_metadata_pane_wallpaper_subtitle_margin_bottom" 82 android:focusable="true"> 83 84 85 86 <TextView 87 android:id="@+id/lock_wallpaper_label" 88 android:layout_width="wrap_content" 89 android:layout_height="wrap_content" 90 android:layout_gravity="start|top" 91 android:layout_alignParentTop="true" 92 android:layout_alignParentStart="true" 93 android:layout_marginTop="@dimen/single_metadata_pane_wallpaper_label_margin_top" 94 android:gravity="top" 95 android:text="@string/lock_screen_message" 96 android:textAppearance="@style/HeaderTextAppearance" 97 android:textColor="@color/currently_set_presentation_mode_text_color" 98 android:maxLines="2" 99 android:ellipsize="end" 100 android:textSize="@dimen/abc_text_size_subhead_material" 101 android:textStyle="bold" /> 102 103 <TextView 104 android:id="@+id/lock_wallpaper_title" 105 android:layout_width="match_parent" 106 android:layout_height="wrap_content" 107 android:layout_above="@+id/lock_wallpaper_subtitle1" 108 android:layout_alignParentStart="true" 109 android:ellipsize="end" 110 android:maxLines="1" 111 android:textAppearance="@android:style/TextAppearance.DeviceDefault.Small" 112 android:textColor="@color/currently_set_both_attribution_title_text_color" 113 android:textSize="@dimen/both_metadata_title_text_size" 114 android:textStyle="bold" /> 115 116 <TextView 117 android:id="@+id/lock_wallpaper_subtitle1" 118 android:layout_width="match_parent" 119 android:layout_height="wrap_content" 120 android:layout_above="@+id/lock_wallpaper_subtitle2" 121 android:layout_alignParentStart="true" 122 android:ellipsize="end" 123 android:maxLines="1" 124 android:textAppearance="@android:style/TextAppearance.DeviceDefault.Small" 125 android:textColor="@color/currently_set_both_attribution_subtitle_text_color" 126 android:textSize="@dimen/abc_text_size_caption_material" /> 127 128 <TextView 129 android:id="@+id/lock_wallpaper_subtitle2" 130 android:layout_width="match_parent" 131 android:layout_height="wrap_content" 132 android:layout_alignParentBottom="true" 133 android:layout_alignParentStart="true" 134 android:ellipsize="end" 135 android:maxLines="1" 136 android:textAppearance="@android:style/TextAppearance.DeviceDefault.Small" 137 android:textColor="@color/currently_set_both_attribution_subtitle_text_color" 138 android:textSize="@dimen/abc_text_size_caption_material" /> 139 140 </RelativeLayout> 141 142 </LinearLayout> 143 </androidx.cardview.widget.CardView> 144 145 <androidx.cardview.widget.CardView 146 android:layout_width="0dp" 147 android:layout_height="wrap_content" 148 android:layout_weight="1" 149 android:layout_marginHorizontal="4dp" 150 app:cardCornerRadius="?android:dialogCornerRadius" 151 app:cardElevation="@dimen/single_metadata_card_elevation" 152 app:cardMaxElevation="@dimen/single_metadata_card_elevation" 153 app:cardPreventCornerOverlap="false" 154 app:cardUseCompatPadding="true" 155 app:contentPadding="0dp"> 156 157 <LinearLayout 158 android:layout_width="match_parent" 159 android:layout_height="match_parent" 160 android:orientation="vertical"> 161 162 <!-- Wraps the image and the "home screen" label overlapping it. --> 163 <FrameLayout 164 android:id="@+id/home_wallpaper_section" 165 android:layout_width="match_parent" 166 android:layout_height="wrap_content"> 167 168 <com.android.wallpaper.widget.WallpaperThumbnailView 169 android:id="@+id/home_wallpaper_image" 170 android:layout_width="match_parent" 171 android:layout_height="@dimen/both_metadata_thumb_height" 172 android:layout_gravity="top" 173 android:clickable="true" 174 android:contentDescription="@string/currently_set_home_wallpaper_thumbnail" 175 android:focusable="true" 176 android:foreground="?attr/selectableItemBackground" 177 android:nextFocusForward="@+id/home_wallpaper_attribution_section" /> 178 179 <ImageButton 180 style="?attr/borderlessButtonStyle" 181 android:id="@+id/home_wallpaper_explore_button" 182 android:layout_width="wrap_content" 183 android:layout_height="wrap_content" 184 android:layout_margin="@dimen/single_metadata_explore_button_margin" 185 android:layout_gravity="top|end" 186 android:background="@drawable/button_over_thumbnail_background" 187 android:clickable="true" 188 android:contentDescription="@string/explore_home_screen" 189 android:focusable="true" 190 android:padding="@dimen/single_metadata_explore_section_button_padding" 191 android:src="@drawable/ic_explore_24px" 192 android:visibility="gone" /> 193 194 <FrameLayout 195 android:id="@+id/home_wallpaper_presentation_section" 196 android:layout_width="match_parent" 197 android:layout_height="wrap_content" 198 android:layout_gravity="bottom" 199 android:padding="@dimen/both_metadata_scrim_content_bottom_margin" 200 android:background="@drawable/presentation_mode_content_protection" 201 android:visibility="gone"> 202 <TextView 203 android:id="@+id/home_wallpaper_presentation_mode" 204 android:layout_width="wrap_content" 205 android:layout_height="wrap_content" 206 android:layout_gravity="center_vertical|start" 207 android:gravity="start" 208 android:textColor="@color/material_white_100" 209 android:textSize="@dimen/abc_text_size_body_2_material"/> 210 211 <ImageButton 212 style="?attr/borderlessButtonStyle" 213 android:id="@+id/skip_home_wallpaper" 214 android:layout_width="wrap_content" 215 android:layout_height="wrap_content" 216 android:layout_marginEnd="0dp" 217 android:layout_gravity="center_vertical|end" 218 android:background="@android:color/transparent" 219 android:clickable="true" 220 android:contentDescription="@string/refresh_daily_wallpaper_home_content_description" 221 android:focusable="true" 222 android:nextFocusForward="@id/home_wallpaper_image" 223 android:padding="@dimen/single_metadata_explore_section_button_padding" 224 android:src="@drawable/ic_refresh_24px" 225 android:visibility="gone" /> 226 </FrameLayout> 227 </FrameLayout> 228 229 <!-- Wraps the attribution section. --> 230 <RelativeLayout 231 android:id="@id/home_wallpaper_attribution_section" 232 android:layout_width="match_parent" 233 android:layout_height="@dimen/both_metadata_attribution_section_height" 234 android:layout_marginEnd="@dimen/single_metadata_pane_attributions_margin_right" 235 android:layout_marginStart="@dimen/single_metadata_pane_attributions_margin_left" 236 android:paddingBottom="@dimen/single_metadata_pane_wallpaper_subtitle_margin_bottom" 237 android:focusable="true"> 238 <TextView 239 android:id="@+id/home_wallpaper_label" 240 android:layout_width="wrap_content" 241 android:layout_height="wrap_content" 242 android:layout_gravity="start|top" 243 android:gravity="top" 244 android:layout_alignParentTop="true" 245 android:layout_alignParentStart="true" 246 android:layout_marginTop="@dimen/single_metadata_pane_wallpaper_label_margin_top" 247 android:text="@string/home_screen_message" 248 android:textAppearance="@style/HeaderTextAppearance" 249 android:textColor="@color/currently_set_presentation_mode_text_color" 250 android:textSize="@dimen/abc_text_size_subhead_material" 251 android:maxLines="2" 252 android:ellipsize="end" 253 android:textStyle="bold" /> 254 255 <TextView 256 android:id="@+id/home_wallpaper_title" 257 android:layout_width="match_parent" 258 android:layout_height="wrap_content" 259 android:layout_above="@+id/home_wallpaper_subtitle1" 260 android:layout_alignParentStart="true" 261 android:ellipsize="end" 262 android:maxLines="1" 263 android:textAppearance="@android:style/TextAppearance.DeviceDefault.Small" 264 android:textColor="@color/currently_set_both_attribution_title_text_color" 265 android:textSize="@dimen/both_metadata_title_text_size" 266 android:textStyle="bold" /> 267 268 <TextView 269 android:id="@+id/home_wallpaper_subtitle1" 270 android:layout_width="match_parent" 271 android:layout_height="wrap_content" 272 android:layout_above="@+id/home_wallpaper_subtitle2" 273 android:layout_alignParentStart="true" 274 android:ellipsize="end" 275 android:maxLines="1" 276 android:textAppearance="@android:style/TextAppearance.DeviceDefault.Small" 277 android:textColor="@color/currently_set_both_attribution_subtitle_text_color" 278 android:textSize="@dimen/abc_text_size_caption_material" /> 279 280 <TextView 281 android:id="@+id/home_wallpaper_subtitle2" 282 android:layout_width="match_parent" 283 android:layout_height="wrap_content" 284 android:layout_alignParentBottom="true" 285 android:layout_alignParentStart="true" 286 android:ellipsize="end" 287 android:maxLines="1" 288 android:textAppearance="@android:style/TextAppearance.DeviceDefault.Small" 289 android:textColor="@color/currently_set_both_attribution_subtitle_text_color" 290 android:textSize="@dimen/abc_text_size_caption_material" /> 291 292 </RelativeLayout> 293 294 </LinearLayout> 295 </androidx.cardview.widget.CardView> 296 297</LinearLayout> 298