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<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 18 xmlns:app="http://schemas.android.com/apk/res-auto" 19 android:id="@+id/magnifier_panel_view" 20 android:layout_width="wrap_content" 21 android:layout_height="wrap_content" 22 android:background="@drawable/accessibility_magnification_setting_view_bg" 23 android:orientation="vertical" 24 android:padding="@dimen/magnification_setting_background_padding" 25 android:focusable="true" 26 android:contentDescription="@string/accessibility_magnification_settings_panel_description"> 27 <LinearLayout 28 android:layout_width="match_parent" 29 android:layout_height="wrap_content" 30 android:orientation="horizontal"> 31 <TextView 32 android:id="@+id/magnifier_size_title" 33 android:layout_width="0dp" 34 android:layout_height="wrap_content" 35 android:layout_weight="1" 36 android:singleLine="true" 37 android:scrollHorizontally="true" 38 android:ellipsize="marquee" 39 android:text="@string/accessibility_magnifier_size" 40 android:textAppearance="@style/TextAppearance.MagnificationSetting.Title" 41 android:focusable="true" 42 android:layout_gravity="center_vertical" /> 43 44 <Button 45 android:id="@+id/magnifier_edit_button" 46 android:background="@null" 47 android:layout_width="wrap_content" 48 android:layout_height="wrap_content" 49 android:text="@string/accessibility_magnifier_edit" 50 android:textAppearance="@style/TextAppearance.MagnificationSetting.EditButton" 51 android:focusable="true" 52 android:layout_gravity="center_vertical" /> 53 </LinearLayout> 54 55 <LinearLayout 56 android:background="@drawable/accessibility_magnification_setting_view_image_btn_layout_bg" 57 android:layout_width="match_parent" 58 android:layout_height="@dimen/magnification_setting_image_button_height" 59 android:minWidth="@dimen/magnification_setting_image_button_background_width" 60 android:orientation="horizontal"> 61 <ImageButton 62 android:id="@+id/magnifier_small_button" 63 android:layout_width="0dp" 64 android:layout_height="@dimen/magnification_setting_image_button_height" 65 android:layout_weight="1" 66 android:scaleType="center" 67 android:background="@drawable/accessibility_magnification_setting_view_image_btn_bg" 68 android:src="@drawable/ic_magnification_menu_small" 69 android:tint="@color/accessibility_magnification_image_button_tint" 70 android:tintMode="src_atop" 71 android:contentDescription="@string/accessibility_magnification_small" /> 72 73 <ImageButton 74 android:id="@+id/magnifier_medium_button" 75 android:layout_width="0dp" 76 android:layout_height="@dimen/magnification_setting_image_button_height" 77 android:layout_weight="1" 78 android:scaleType="center" 79 android:background="@drawable/accessibility_magnification_setting_view_image_btn_bg" 80 android:src="@drawable/ic_magnification_menu_medium" 81 android:tint="@color/accessibility_magnification_image_button_tint" 82 android:tintMode="src_atop" 83 android:contentDescription="@string/accessibility_magnification_medium" /> 84 85 <ImageButton 86 android:id="@+id/magnifier_large_button" 87 android:layout_width="0dp" 88 android:layout_height="@dimen/magnification_setting_image_button_height" 89 android:layout_weight="1" 90 android:scaleType="center" 91 android:background="@drawable/accessibility_magnification_setting_view_image_btn_bg" 92 android:src="@drawable/ic_magnification_menu_large" 93 android:tint="@color/accessibility_magnification_image_button_tint" 94 android:tintMode="src_atop" 95 android:contentDescription="@string/accessibility_magnification_large" /> 96 97 <ImageButton 98 android:id="@+id/magnifier_full_button" 99 android:layout_width="0dp" 100 android:layout_height="@dimen/magnification_setting_image_button_height" 101 android:layout_weight="1" 102 android:scaleType="center" 103 android:background="@drawable/accessibility_magnification_setting_view_image_btn_bg" 104 android:src="@drawable/ic_open_in_full" 105 android:tint="@color/accessibility_magnification_image_button_tint" 106 android:tintMode="src_atop" 107 android:contentDescription="@string/accessibility_magnification_fullscreen" /> 108 </LinearLayout> 109 110 <LinearLayout 111 android:id="@+id/magnifier_horizontal_lock_view" 112 android:layout_width="match_parent" 113 android:layout_height="wrap_content" 114 android:orientation="horizontal" 115 android:layout_marginTop="@dimen/magnification_setting_view_margin" 116 android:focusable="true"> 117 118 <TextView 119 android:id="@+id/magnifier_horizontal_lock_title" 120 android:layout_width="0dp" 121 android:layout_height="wrap_content" 122 android:layout_weight="1" 123 android:singleLine="true" 124 android:scrollHorizontally="true" 125 android:ellipsize="marquee" 126 android:text="@string/accessibility_allow_diagonal_scrolling" 127 android:textAppearance="@style/TextAppearance.MagnificationSetting.Title" 128 android:labelFor="@id/magnifier_horizontal_lock_switch" 129 android:layout_gravity="center_vertical" /> 130 131 <Switch 132 android:id="@+id/magnifier_horizontal_lock_switch" 133 android:switchMinWidth="@dimen/settingslib_switch_track_width" 134 android:layout_gravity="right|center_vertical" 135 android:layout_width="@dimen/settingslib_switch_track_width" 136 android:layout_height="wrap_content" 137 android:track="@drawable/settingslib_track_selector" 138 android:thumb="@drawable/settingslib_thumb_selector" 139 android:theme="@style/MainSwitch.Settingslib"/> 140 141 </LinearLayout> 142 143 <TextView 144 android:layout_width="match_parent" 145 android:layout_height="wrap_content" 146 android:text="@string/accessibility_magnification_zoom" 147 android:textAppearance="@style/TextAppearance.MagnificationSetting.Title" 148 android:layout_marginTop="@dimen/magnification_setting_view_margin" 149 android:focusable="true" /> 150 151 <com.android.systemui.common.ui.view.SeekBarWithIconButtonsView 152 android:id="@+id/magnifier_zoom_slider" 153 android:layout_width="match_parent" 154 android:layout_height="wrap_content" 155 app:progress="0" 156 app:iconStartContentDescription="@string/accessibility_control_zoom_out" 157 app:iconEndContentDescription="@string/accessibility_control_zoom_in" 158 app:tickMark="@android:color/transparent" 159 app:seekBarChangeMagnitude="10" 160 /> 161 162 <Button 163 android:id="@+id/magnifier_done_button" 164 android:background="@drawable/accessibility_window_magnification_button_done_bg" 165 android:layout_width="wrap_content" 166 android:layout_height="wrap_content" 167 android:text="@string/accessibility_magnification_done" 168 android:textAppearance="@style/TextAppearance.MagnificationSetting.DoneButton" 169 android:focusable="true" 170 android:layout_gravity="center_horizontal" 171 android:layout_marginTop="@dimen/magnification_setting_view_margin"/> 172</LinearLayout> 173