Santiago Etchebehere | 10e79f1 | 2018-12-19 15:53:42 -0800 | [diff] [blame] | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <!-- |
| 3 | Copyright (C) 2018 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 | <LinearLayout |
| 18 | xmlns:android="http://schemas.android.com/apk/res/android" |
Santiago Etchebehere | 60c3f2f | 2019-05-22 14:38:19 -0700 | [diff] [blame] | 19 | xmlns:app="http://schemas.android.com/apk/res-auto" |
Santiago Etchebehere | 10e79f1 | 2018-12-19 15:53:42 -0800 | [diff] [blame] | 20 | android:layout_width="match_parent" |
| 21 | android:layout_height="match_parent" |
| 22 | android:orientation="vertical" |
Santiago Etchebehere | eb18698 | 2019-01-31 14:49:06 -0800 | [diff] [blame] | 23 | android:background="?android:colorPrimary"> |
Santiago Etchebehere | 10e79f1 | 2018-12-19 15:53:42 -0800 | [diff] [blame] | 24 | <include layout="@layout/section_header"/> |
| 25 | |
Santiago Etchebehere | 5818e78 | 2019-05-24 11:15:34 -0700 | [diff] [blame] | 26 | <FrameLayout |
Santiago Etchebehere | 988f99d | 2018-12-20 17:13:12 -0800 | [diff] [blame] | 27 | android:layout_width="match_parent" |
Santiago Etchebehere | 60c3f2f | 2019-05-22 14:38:19 -0700 | [diff] [blame] | 28 | android:layout_height="match_parent"> |
Santiago Etchebehere | 10e79f1 | 2018-12-19 15:53:42 -0800 | [diff] [blame] | 29 | |
Santiago Etchebehere | 5818e78 | 2019-05-24 11:15:34 -0700 | [diff] [blame] | 30 | <androidx.constraintlayout.widget.ConstraintLayout |
| 31 | android:id="@+id/content_section" |
Santiago Etchebehere | 60c3f2f | 2019-05-22 14:38:19 -0700 | [diff] [blame] | 32 | android:layout_width="match_parent" |
Santiago Etchebehere | 5818e78 | 2019-05-24 11:15:34 -0700 | [diff] [blame] | 33 | android:layout_height="match_parent"> |
Santiago Etchebehere | 10e79f1 | 2018-12-19 15:53:42 -0800 | [diff] [blame] | 34 | |
Santiago Etchebehere | 5818e78 | 2019-05-24 11:15:34 -0700 | [diff] [blame] | 35 | <com.android.customization.widget.PreviewPager |
| 36 | android:id="@+id/theme_preview_pager" |
| 37 | android:layout_width="match_parent" |
| 38 | android:layout_height="wrap_content" |
Santiago Etchebehere | 0f074b0 | 2019-06-03 16:29:41 -0700 | [diff] [blame] | 39 | android:background="@color/preview_pager_background" |
Santiago Etchebehere | 5818e78 | 2019-05-24 11:15:34 -0700 | [diff] [blame] | 40 | app:layout_constrainedHeight="true" |
| 41 | app:layout_constraintBottom_toTopOf="@id/options_container" |
| 42 | app:layout_constraintEnd_toEndOf="parent" |
| 43 | app:layout_constraintHeight_max="@dimen/preview_pager_max_height" |
Santiago Etchebehere | 5818e78 | 2019-05-24 11:15:34 -0700 | [diff] [blame] | 44 | app:layout_constraintStart_toStartOf="parent" |
| 45 | app:layout_constraintTop_toTopOf="parent" |
| 46 | app:layout_constraintVertical_bias="0.0" |
| 47 | app:layout_constraintVertical_chainStyle="spread_inside"/> |
Santiago Etchebehere | 10e79f1 | 2018-12-19 15:53:42 -0800 | [diff] [blame] | 48 | |
Santiago Etchebehere | 5818e78 | 2019-05-24 11:15:34 -0700 | [diff] [blame] | 49 | <androidx.recyclerview.widget.RecyclerView |
| 50 | android:id="@+id/options_container" |
| 51 | android:layout_width="match_parent" |
| 52 | android:layout_height="@dimen/options_container_height" |
| 53 | android:layout_gravity="bottom|center_horizontal" |
| 54 | android:layout_marginTop="10dp" |
| 55 | android:layout_weight="1" |
| 56 | app:layout_constraintBottom_toTopOf="@id/use_my_wallpaper" |
| 57 | app:layout_constraintEnd_toEndOf="parent" |
| 58 | app:layout_constraintStart_toStartOf="parent" |
| 59 | app:layout_constraintTop_toBottomOf="@+id/theme_preview_pager" |
| 60 | app:layout_constraintVertical_bias="1.0"/> |
Santiago Etchebehere | 60c3f2f | 2019-05-22 14:38:19 -0700 | [diff] [blame] | 61 | |
Santiago Etchebehere | 5818e78 | 2019-05-24 11:15:34 -0700 | [diff] [blame] | 62 | <CheckBox |
| 63 | android:id="@+id/use_my_wallpaper" |
| 64 | android:layout_width="wrap_content" |
| 65 | android:layout_height="@dimen/min_taptarget_height" |
| 66 | android:layout_marginStart="10dp" |
| 67 | android:ellipsize="end" |
| 68 | android:gravity="start|center_vertical" |
| 69 | android:paddingLeft="4dp" |
| 70 | android:text="@string/keep_my_wallpaper" |
| 71 | app:layout_constraintBottom_toTopOf="@id/apply_button" |
| 72 | app:layout_constraintEnd_toEndOf="parent" |
| 73 | app:layout_constraintHeight_min="@dimen/min_taptarget_height" |
| 74 | app:layout_constraintHorizontal_bias="0.0" |
| 75 | app:layout_constraintStart_toStartOf="parent" |
| 76 | app:layout_constraintTop_toBottomOf="@id/options_container" |
| 77 | app:layout_constraintVertical_bias="1.0"/> |
| 78 | |
| 79 | <Button |
| 80 | android:id="@+id/apply_button" |
| 81 | style="@style/ActionPrimaryButton" |
| 82 | android:layout_width="wrap_content" |
| 83 | android:layout_height="wrap_content" |
| 84 | android:layout_gravity="end" |
| 85 | android:layout_marginEnd="10dp" |
| 86 | android:layout_marginBottom="10dp" |
| 87 | android:text="@string/apply_theme_btn" |
| 88 | app:layout_constraintBottom_toBottomOf="parent" |
| 89 | app:layout_constraintEnd_toEndOf="parent"/> |
| 90 | </androidx.constraintlayout.widget.ConstraintLayout> |
| 91 | |
| 92 | <androidx.core.widget.ContentLoadingProgressBar |
| 93 | android:id="@+id/loading_indicator" |
| 94 | style="@android:style/Widget.DeviceDefault.ProgressBar" |
Santiago Etchebehere | 60c3f2f | 2019-05-22 14:38:19 -0700 | [diff] [blame] | 95 | android:layout_width="wrap_content" |
Amin Shaikh | 06972d8 | 2019-04-19 16:29:01 -0400 | [diff] [blame] | 96 | android:layout_height="wrap_content" |
Santiago Etchebehere | 5818e78 | 2019-05-24 11:15:34 -0700 | [diff] [blame] | 97 | android:layout_marginTop="200dp" |
| 98 | android:layout_gravity="center_horizontal|top" |
| 99 | android:indeterminate="true"/> |
Santiago Etchebehere | 10e79f1 | 2018-12-19 15:53:42 -0800 | [diff] [blame] | 100 | |
Santiago Etchebehere | 5818e78 | 2019-05-24 11:15:34 -0700 | [diff] [blame] | 101 | <FrameLayout |
| 102 | android:id="@+id/error_section" |
| 103 | android:layout_width="match_parent" |
| 104 | android:layout_height="match_parent" |
| 105 | android:visibility="gone"> |
| 106 | <TextView |
| 107 | android:id="@+id/error_message" |
Santiago Etchebehere | 58e1b52 | 2019-12-05 10:25:13 -0800 | [diff] [blame^] | 108 | style="@style/TitleTextAppearance" |
Santiago Etchebehere | 5818e78 | 2019-05-24 11:15:34 -0700 | [diff] [blame] | 109 | android:layout_width="match_parent" |
| 110 | android:layout_height="wrap_content" |
| 111 | android:layout_gravity="center" |
| 112 | android:gravity="center" |
| 113 | android:text="@string/something_went_wrong"/> |
| 114 | </FrameLayout> |
| 115 | </FrameLayout> |
Santiago Etchebehere | 10e79f1 | 2018-12-19 15:53:42 -0800 | [diff] [blame] | 116 | </LinearLayout> |