1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 ~ Copyright (C) 2022 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<FrameLayout 18 xmlns:android="http://schemas.android.com/apk/res/android" 19 xmlns:app="http://schemas.android.com/apk/res-auto" 20 xmlns:tools="http://schemas.android.com/tools" 21 android:fitsSystemWindows="true" 22 android:layout_width="match_parent" 23 android:layout_height="match_parent" 24 tools:context=".materials.BackgroundBlurActivity"> 25 26 <LinearLayout 27 android:id="@+id/background" 28 android:layout_width="390dp" 29 android:layout_height="wrap_content" 30 android:layout_gravity="center" 31 android:padding="15dp" 32 android:orientation="vertical"> 33 34 <TextView 35 android:layout_width="match_parent" 36 android:layout_height="wrap_content" 37 android:gravity="center_horizontal" 38 android:padding="10dp" 39 android:textColor="#ffffffff" 40 android:text="Hello blurry world!"/> 41 42 <LinearLayout 43 android:layout_width="match_parent" 44 android:layout_height="wrap_content" 45 android:orientation="horizontal"> 46 <TextView 47 android:layout_width="wrap_content" 48 android:layout_height="wrap_content" 49 android:layout_weight="1" 50 android:textColor="#ffffffff" 51 android:text="Background blur"/> 52 53 <SeekBar 54 android:id="@+id/set_background_blur" 55 android:min="0" 56 android:max="300" 57 android:layout_width="160dp" 58 android:layout_height="wrap_content"/> 59 <TextView 60 android:id="@+id/background_blur_radius" 61 android:layout_width="wrap_content" 62 android:layout_height="wrap_content" 63 android:textColor="#ffffffff" 64 android:ems="3" 65 android:gravity="center" 66 android:paddingLeft="10dp" 67 android:paddingRight="10dp" 68 android:text="TODO"/> 69 </LinearLayout> 70 <LinearLayout 71 android:layout_width="match_parent" 72 android:layout_height="wrap_content" 73 android:orientation="horizontal"> 74 <TextView 75 android:layout_width="wrap_content" 76 android:layout_height="wrap_content" 77 android:layout_weight="1" 78 android:textColor="#ffffffff" 79 android:text="Background alpha"/> 80 81 <SeekBar 82 android:id="@+id/set_background_alpha" 83 android:min="0" 84 android:max="100" 85 android:layout_width="160dp" 86 android:layout_height="wrap_content" /> 87 <TextView 88 android:id="@+id/background_alpha" 89 android:layout_width="wrap_content" 90 android:layout_height="wrap_content" 91 android:textColor="#ffffffff" 92 android:ems="3" 93 android:gravity="center" 94 android:paddingLeft="10dp" 95 android:paddingRight="10dp" 96 android:text="TODO"/> 97 </LinearLayout> 98 <LinearLayout 99 android:layout_width="match_parent" 100 android:layout_height="wrap_content" 101 android:orientation="horizontal"> 102 <TextView 103 android:layout_width="wrap_content" 104 android:layout_height="wrap_content" 105 android:layout_weight="1" 106 android:textColor="#ffffffff" 107 android:text="Blur behind"/> 108 109 <SeekBar 110 android:id="@+id/set_blur_behind" 111 android:min="0" 112 android:max="300" 113 android:layout_width="160dp" 114 android:layout_height="wrap_content" /> 115 <TextView 116 android:id="@+id/blur_behind_radius" 117 android:layout_width="wrap_content" 118 android:layout_height="wrap_content" 119 android:gravity="center" 120 android:textColor="#ffffffff" 121 android:paddingLeft="10dp" 122 android:paddingRight="10dp" 123 android:ems="3" 124 android:text="TODO"/> 125 </LinearLayout> 126 <LinearLayout 127 android:layout_width="match_parent" 128 android:layout_height="wrap_content" 129 android:orientation="horizontal"> 130 <TextView 131 android:layout_width="wrap_content" 132 android:layout_height="wrap_content" 133 android:layout_weight="1" 134 android:textColor="#ffffffff" 135 android:text="Dim amount"/> 136 137 <SeekBar 138 android:id="@+id/set_dim_amount" 139 android:min="0" 140 android:max="100" 141 android:layout_width="160dp" 142 android:layout_height="wrap_content" /> 143 <TextView 144 android:id="@+id/dim_amount" 145 android:layout_width="wrap_content" 146 android:layout_height="wrap_content" 147 android:gravity="center" 148 android:textColor="#ffffffff" 149 android:paddingLeft="10dp" 150 android:paddingRight="10dp" 151 android:ems="3" 152 android:text="TODO"/> 153 </LinearLayout> 154 155 <LinearLayout 156 android:layout_width="match_parent" 157 android:layout_height="wrap_content" 158 android:layout_gravity="center" 159 android:layout_marginTop="5dp" 160 android:orientation="vertical" 161 android:gravity="center"> 162 163 <Button 164 android:id="@+id/toggle_blur_enabled" 165 android:layout_width="match_parent" 166 android:layout_height="wrap_content" 167 android:text="Disable blur" 168 android:onClick="toggleForceBlurDisabled"/> 169 170 <Button 171 android:id="@+id/toggle_battery_saving_mode" 172 android:layout_width="match_parent" 173 android:layout_height="wrap_content" 174 android:text="TODO" 175 android:onClick="toggleBatterySavingMode"/> 176 </LinearLayout> 177 <requestFocus/> 178 179 </LinearLayout> 180</FrameLayout> 181