You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
85 lines
4.0 KiB
85 lines
4.0 KiB
<?xml version="1.0" encoding="utf-8"?>
|
|
<!--
|
|
Copyright (C) 2021 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.
|
|
-->
|
|
<com.android.wallpaper.picker.WallpaperSectionView
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:paddingBottom="@dimen/section_bottom_padding"
|
|
android:paddingHorizontal="@dimen/section_horizontal_padding"
|
|
android:orientation="vertical">
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:background="@drawable/wallpaper_section_background"
|
|
android:contentDescription="@string/wallpaper_preview_card_content_description">
|
|
|
|
<!-- Width percent = 146(preview width in spec) / 364(parent width in spec) = 0.4 -->
|
|
<!-- The height will be determined programmatically -->
|
|
<include
|
|
android:id="@+id/lock_preview"
|
|
layout="@layout/wallpaper_preview_card"
|
|
android:layout_width="0dp"
|
|
android:layout_height="0dp"
|
|
android:layout_marginTop="@dimen/wallpaper_preview_margin_top"
|
|
app:layout_constraintEnd_toStartOf="@id/home_preview"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
app:layout_constraintWidth_percent="0.4" />
|
|
|
|
<include
|
|
android:id="@+id/home_preview"
|
|
layout="@layout/wallpaper_preview_card"
|
|
android:layout_width="0dp"
|
|
android:layout_height="0dp"
|
|
android:layout_marginTop="@dimen/wallpaper_preview_margin_top"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toEndOf="@id/lock_preview"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
app:layout_constraintWidth_percent="0.4" />
|
|
|
|
<include
|
|
android:id="@+id/permission_needed"
|
|
layout="@layout/permission_needed_layout"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:visibility="gone"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@id/home_preview" />
|
|
|
|
<Button
|
|
android:id="@+id/wallpaper_picker_entry"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginVertical="@dimen/wallpaper_picker_entry_margin_vertical"
|
|
android:paddingHorizontal="@dimen/wallpaper_picker_entry_horizontal_padding"
|
|
android:background="@drawable/btn_transparent_background"
|
|
android:textColor="?android:attr/colorAccent"
|
|
android:drawablePadding="@dimen/wallpaper_picker_entry_drawable_padding"
|
|
android:drawableStart="@drawable/ic_nav_wallpaper"
|
|
android:drawableTint="?android:attr/colorAccent"
|
|
android:text="@string/wallpaper_picker_entry_title"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@id/permission_needed" />
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
</com.android.wallpaper.picker.WallpaperSectionView>
|