1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 ~ Copyright (C) 2024 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 18<com.android.wallpaper.widget.floatingsheetcontent.WallpaperEffectsView2 19 xmlns:android="http://schemas.android.com/apk/res/android" 20 android:layout_width="match_parent" 21 android:layout_height="wrap_content" 22 android:orientation="vertical" 23 android:padding="@dimen/wallpaper_info_pane_padding" 24 android:theme="@style/WallpaperPicker.BottomPaneStyle"> 25 26 <TextView 27 android:id="@+id/wallpaper_effects_title" 28 android:layout_width="match_parent" 29 android:layout_height="wrap_content" 30 android:textAlignment="viewStart" 31 android:textAppearance="@style/TitleTextAppearance" 32 android:textColor="?android:textColorPrimary" /> 33 34 <TextView 35 android:id="@+id/wallpaper_effects_subtitle" 36 android:layout_width="match_parent" 37 android:layout_height="wrap_content" 38 android:layout_marginTop="@dimen/wallpaper_info_pane_subtitle1_top_margin" 39 android:textColor="?android:textColorSecondary" 40 android:textSize="14sp" /> 41 42 <RelativeLayout 43 android:layout_width="wrap_content" 44 android:layout_height="wrap_content" 45 android:layout_marginTop="@dimen/wallpaper_info_pane_interaction_top_margin"> 46 47 <LinearLayout 48 android:id="@+id/wallpaper_effect_linear_layout" 49 android:layout_width="match_parent" 50 android:layout_height="wrap_content" 51 android:clickable="true" 52 android:gravity="center_vertical" 53 android:orientation="horizontal"> 54 55 <TextView 56 android:id="@+id/wallpaper_effect_toggle_title" 57 android:layout_width="0dp" 58 android:layout_height="wrap_content" 59 android:layout_weight="1" 60 android:textAlignment="viewStart" 61 android:textColor="?android:textColorSecondary" /> 62 63 <Switch 64 android:id="@+id/wallpaper_effect_switch" 65 style="@style/Switch.SettingsLib" 66 android:layout_width="wrap_content" 67 android:layout_height="wrap_content" 68 android:background="@null" 69 android:clickable="false" 70 android:focusable="false" /> 71 </LinearLayout> 72 73 <RelativeLayout 74 android:id="@+id/button_layout" 75 android:layout_width="wrap_content" 76 android:layout_height="wrap_content" 77 android:layout_centerHorizontal="true"> 78 79 <Button 80 android:id="@+id/download_model_button" 81 android:layout_width="@dimen/wallpaper_effect_download_button_width" 82 android:layout_height="@dimen/wallpaper_effect_download_button_height" 83 android:background="@drawable/effect_download_button_background" 84 android:contentDescription="@string/download_effects" 85 android:visibility="visible" /> 86 87 <LinearLayout 88 android:layout_width="wrap_content" 89 android:layout_height="wrap_content" 90 android:layout_centerInParent="true" 91 android:elevation="2dp"> 92 93 <ImageView 94 android:layout_width="@dimen/wallpaper_effect_download_image_size" 95 android:layout_height="@dimen/wallpaper_effect_download_image_size" 96 android:layout_gravity="center_vertical" 97 android:src="@drawable/ic_effects_download_24px" /> 98 99 <TextView 100 android:layout_width="wrap_content" 101 android:layout_height="wrap_content" 102 android:layout_gravity="center_vertical" 103 android:paddingStart="@dimen/wallpaper_effect_download_text_padding_start" 104 android:text="@string/bottom_action_bar_download" 105 android:textAppearance="@style/SeparatedTabsTextAppearance" 106 android:textColor="@color/text_color_on_accent" /> 107 </LinearLayout> 108 </RelativeLayout> 109 110 <ProgressBar 111 android:id="@+id/action_progress" 112 android:layout_width="@dimen/wallpaper_effect_downloading_progress_size" 113 android:layout_height="@dimen/wallpaper_effect_downloading_progress_size" 114 android:indeterminateTint="?android:attr/textColorPrimary" 115 android:layout_centerHorizontal="true" 116 android:layout_marginBottom="5dp" 117 android:visibility="visible" /> 118 119 <RelativeLayout 120 android:id="@+id/buttons_container" 121 android:layout_width="wrap_content" 122 android:layout_height="@dimen/wallpaper_effect_failed_container_height" 123 android:visibility="invisible"> 124 125 <Button 126 android:id="@+id/open_my_photo_button" 127 android:layout_width="wrap_content" 128 android:layout_height="wrap_content" 129 android:layout_centerVertical="true" 130 android:text="@string/open_my_photos" 131 android:textColor="@color/color_accent_primary_variant" 132 android:textSize="@dimen/wallpaper_effect_failed_button_size" 133 android:visibility="gone" /> 134 135 <Button 136 android:id="@+id/continue_button" 137 android:layout_width="wrap_content" 138 android:layout_height="match_parent" 139 android:layout_alignParentEnd="true" 140 android:layout_centerVertical="true" 141 android:background="@drawable/effect_continue_button_background" 142 android:gravity="center" 143 android:paddingHorizontal="@dimen/wallpaper_picker_entry_horizontal_padding" 144 android:text="@string/start_rotation_dialog_continue" 145 android:textColor="@color/text_color_primary" 146 android:textSize="@dimen/wallpaper_effect_failed_button_size" 147 android:visibility="gone" /> 148 149 <Button 150 android:id="@+id/try_again_button" 151 android:layout_width="wrap_content" 152 android:layout_height="wrap_content" 153 android:layout_centerVertical="true" 154 android:textColor="@color/color_accent_primary_variant" 155 android:textSize="@dimen/wallpaper_effect_failed_button_size" 156 android:visibility="gone" /> 157 </RelativeLayout> 158 </RelativeLayout> 159</com.android.wallpaper.widget.floatingsheetcontent.WallpaperEffectsView2>