|
| 1 | +<?xml version="1.0" encoding="utf-8"?> |
| 2 | +<!-- |
| 3 | + Copyright 2019 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 | +<ScrollView |
| 18 | + xmlns:android="http://schemas.android.com/apk/res/android" |
| 19 | + xmlns:app="http://schemas.android.com/apk/res-auto" |
| 20 | + android:layout_width="match_parent" |
| 21 | + android:layout_height="match_parent"> |
| 22 | + |
| 23 | + <LinearLayout |
| 24 | + android:layout_width="match_parent" |
| 25 | + android:layout_height="wrap_content" |
| 26 | + android:paddingLeft="16dp" |
| 27 | + android:paddingRight="16dp" |
| 28 | + android:orientation="vertical"> |
| 29 | + |
| 30 | + <TextView |
| 31 | + android:layout_width="wrap_content" |
| 32 | + android:layout_height="wrap_content" |
| 33 | + android:paddingTop="@dimen/cat_slider_title_top_padding" |
| 34 | + android:text="@string/cat_slider_label_floating"/> |
| 35 | + |
| 36 | + <LinearLayout |
| 37 | + android:layout_width="match_parent" |
| 38 | + android:layout_height="wrap_content" |
| 39 | + android:gravity="center_vertical"> |
| 40 | + |
| 41 | + <androidx.appcompat.widget.SwitchCompat |
| 42 | + android:id="@+id/switch_button_1" |
| 43 | + android:layout_width="wrap_content" |
| 44 | + android:layout_height="wrap_content" /> |
| 45 | + |
| 46 | + <com.google.android.material.slider.RangeSlider |
| 47 | + android:id="@+id/slider_1" |
| 48 | + android:layout_width="0dp" |
| 49 | + android:layout_height="wrap_content" |
| 50 | + android:layout_weight="1" |
| 51 | + android:layout_marginLeft="@dimen/cat_slider_left_margin" |
| 52 | + android:layout_marginStart="@dimen/cat_slider_left_margin" |
| 53 | + android:valueFrom="0" |
| 54 | + android:valueTo="10" |
| 55 | + app:values="@array/initial_slider_values" |
| 56 | + app:labelBehavior="floating"/> |
| 57 | + </LinearLayout> |
| 58 | + |
| 59 | + <TextView |
| 60 | + android:layout_width="wrap_content" |
| 61 | + android:layout_height="wrap_content" |
| 62 | + android:paddingTop="@dimen/cat_slider_title_top_padding" |
| 63 | + android:text="@string/cat_slider_label_within_bounds"/> |
| 64 | + |
| 65 | + <LinearLayout |
| 66 | + android:layout_width="match_parent" |
| 67 | + android:layout_height="wrap_content" |
| 68 | + android:gravity="center_vertical"> |
| 69 | + |
| 70 | + <androidx.appcompat.widget.SwitchCompat |
| 71 | + android:id="@+id/switch_button_2" |
| 72 | + android:layout_width="wrap_content" |
| 73 | + android:layout_height="wrap_content" /> |
| 74 | + |
| 75 | + <com.google.android.material.slider.RangeSlider |
| 76 | + android:id="@+id/slider_2" |
| 77 | + android:layout_width="0dp" |
| 78 | + android:layout_height="wrap_content" |
| 79 | + android:layout_weight="1" |
| 80 | + android:layout_marginLeft="@dimen/cat_slider_left_margin" |
| 81 | + android:layout_marginStart="@dimen/cat_slider_left_margin" |
| 82 | + android:valueFrom="0" |
| 83 | + android:valueTo="10" |
| 84 | + app:values="@array/initial_slider_values" |
| 85 | + app:labelBehavior="withinBounds"/> |
| 86 | + </LinearLayout> |
| 87 | + |
| 88 | + <TextView |
| 89 | + android:layout_width="wrap_content" |
| 90 | + android:layout_height="wrap_content" |
| 91 | + android:paddingTop="@dimen/cat_slider_title_top_padding" |
| 92 | + android:text="@string/cat_slider_label_gone"/> |
| 93 | + |
| 94 | + <LinearLayout |
| 95 | + android:layout_width="match_parent" |
| 96 | + android:layout_height="wrap_content" |
| 97 | + android:gravity="center_vertical"> |
| 98 | + |
| 99 | + <androidx.appcompat.widget.SwitchCompat |
| 100 | + android:id="@+id/switch_button_3" |
| 101 | + android:layout_width="wrap_content" |
| 102 | + android:layout_height="wrap_content" /> |
| 103 | + |
| 104 | + <com.google.android.material.slider.RangeSlider |
| 105 | + android:id="@+id/slider_3" |
| 106 | + android:layout_width="0dp" |
| 107 | + android:layout_height="wrap_content" |
| 108 | + android:layout_weight="1" |
| 109 | + android:layout_marginLeft="@dimen/cat_slider_left_margin" |
| 110 | + android:layout_marginStart="@dimen/cat_slider_left_margin" |
| 111 | + android:valueFrom="0" |
| 112 | + android:valueTo="10" |
| 113 | + app:values="@array/initial_slider_values" |
| 114 | + app:labelBehavior="gone"/> |
| 115 | + </LinearLayout> |
| 116 | + |
| 117 | + <TextView |
| 118 | + android:layout_width="wrap_content" |
| 119 | + android:layout_height="wrap_content" |
| 120 | + android:paddingTop="@dimen/cat_slider_title_top_padding" |
| 121 | + android:text="@string/cat_slider_label_visible"/> |
| 122 | + |
| 123 | + <LinearLayout |
| 124 | + android:layout_width="match_parent" |
| 125 | + android:layout_height="wrap_content" |
| 126 | + android:gravity="center_vertical"> |
| 127 | + |
| 128 | + <androidx.appcompat.widget.SwitchCompat |
| 129 | + android:id="@+id/switch_button_4" |
| 130 | + android:layout_width="wrap_content" |
| 131 | + android:layout_height="wrap_content" /> |
| 132 | + |
| 133 | + <com.google.android.material.slider.RangeSlider |
| 134 | + android:id="@+id/slider_4" |
| 135 | + android:layout_width="0dp" |
| 136 | + android:layout_height="wrap_content" |
| 137 | + android:layout_weight="1" |
| 138 | + android:layout_marginLeft="@dimen/cat_slider_left_margin" |
| 139 | + android:layout_marginStart="@dimen/cat_slider_left_margin" |
| 140 | + android:valueFrom="0" |
| 141 | + android:valueTo="10" |
| 142 | + app:values="@array/initial_slider_values" |
| 143 | + app:labelBehavior="visible"/> |
| 144 | + </LinearLayout> |
| 145 | + </LinearLayout> |
| 146 | +</ScrollView> |
0 commit comments