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 18<androidx.constraintlayout.widget.ConstraintLayout 19 xmlns:android="http://schemas.android.com/apk/res/android" 20 xmlns:app="http://schemas.android.com/apk/res-auto" 21 android:id="@+id/widgetLayout" 22 android:background="@color/widget_background" 23 android:layout_width="match_parent" 24 android:layout_height="match_parent"> 25 26 <include layout="@layout/set_background" 27 android:id="@+id/setBackground" 28 android:layout_width="wrap_content" 29 android:layout_height="wrap_content" 30 android:layout_marginTop="20dp" 31 app:layout_constraintBottom_toTopOf="@+id/widget_checkbox" 32 app:layout_constraintEnd_toEndOf="parent" 33 app:layout_constraintStart_toStartOf="parent" 34 app:layout_constraintTop_toTopOf="parent"/> 35 36 <LinearLayout 37 android:layout_width="wrap_content" 38 android:layout_height="wrap_content" 39 android:layout_marginTop="20dp" 40 android:layout_marginStart="100dp" 41 android:orientation="horizontal" 42 android:id="@+id/checkbox_layout" 43 app:layout_constraintTop_toBottomOf="@+id/setBackground" 44 app:layout_constraintStart_toStartOf="parent"> 45 46 <TextView 47 android:id="@+id/widget_checkbox" 48 android:layout_width="wrap_content" 49 android:layout_height="wrap_content" 50 android:text="@string/widget_checkbox"/> 51 52 <CheckBox android:id="@+id/widget_checkbox" 53 android:layout_width="wrap_content" 54 android:layout_height="wrap_content" 55 android:layout_marginStart="16dp"/> 56 57 </LinearLayout> 58 59 <LinearLayout 60 android:layout_width="wrap_content" 61 android:layout_height="wrap_content" 62 android:orientation="horizontal" 63 android:layout_marginTop="20dp" 64 android:layout_marginStart="100dp" 65 android:id="@+id/switch_layout" 66 app:layout_constraintTop_toBottomOf="@+id/checkbox_layout" 67 app:layout_constraintStart_toStartOf="parent"> 68 69 <TextView 70 android:id="@+id/toggle_switch" 71 android:layout_width="wrap_content" 72 android:layout_height="wrap_content" 73 android:text="@string/toggle_switch"/> 74 75 <Switch 76 android:id="@+id/widget_switch" 77 android:layout_width="wrap_content" 78 android:layout_marginStart="16dp" 79 android:layout_height="wrap_content"/> 80 81 </LinearLayout> 82 83 <LinearLayout 84 android:layout_width="wrap_content" 85 android:layout_height="wrap_content" 86 android:orientation="horizontal" 87 android:layout_marginTop="20dp" 88 android:layout_marginStart="100dp" 89 android:id="@+id/progress_bar_layout" 90 app:layout_constraintTop_toBottomOf="@+id/switch_layout" 91 app:layout_constraintStart_toStartOf="parent"> 92 93 <TextView 94 android:id="@+id/progress_bar" 95 android:layout_width="wrap_content" 96 android:layout_height="wrap_content" 97 android:text="@string/progress_bar"/> 98 99 <SeekBar 100 android:id="@+id/widget_seek_bar" 101 android:layout_width="200dp" 102 android:layout_height="30dp" 103 android:layout_marginStart="16dp"/> 104 105 </LinearLayout> 106 107 108 <Button 109 android:id="@+id/trigger_config_change" 110 android:layout_width="wrap_content" 111 android:layout_height="wrap_content" 112 android:text="Trigger Config change Day/Night Mode" 113 app:layout_constraintBottom_toBottomOf="parent" 114 app:layout_constraintLeft_toLeftOf="parent" 115 app:layout_constraintRight_toRightOf="parent" 116 app:layout_constraintTop_toBottomOf="@+id/progress_bar_layout"/> 117 <include layout="@layout/menu_button"/> 118 119</androidx.constraintlayout.widget.ConstraintLayout>