1<?xml version="1.0" encoding="utf-8"?> 2<!-- Copyright (C) 2023 The Android Open Source Project 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15--> 16<com.android.launcher3.taskbar.KeyboardQuickSwitchView 17 xmlns:android="http://schemas.android.com/apk/res/android" 18 xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" 19 xmlns:app="http://schemas.android.com/apk/res-auto" 20 android:id="@+id/keyboard_quick_switch_view" 21 android:contentDescription="@string/quick_switch_content_description" 22 android:accessibilityPaneTitle="@string/quick_switch_pane_title" 23 android:layout_width="match_parent" 24 android:layout_height="wrap_content" 25 android:layout_marginTop="@dimen/keyboard_quick_switch_margin_top" 26 android:layout_marginHorizontal="@dimen/keyboard_quick_switch_margin_ends" 27 android:layout_gravity="center_horizontal" 28 android:background="@drawable/keyboard_quick_switch_view_background" 29 android:clipToOutline="true" 30 android:alpha="0" 31 android:visibility="invisible" 32 android:focusableInTouchMode="true" 33 app:layout_ignoreInsets="true"> 34 35 <androidx.constraintlayout.widget.ConstraintLayout 36 android:id="@+id/no_recent_items_pane" 37 android:layout_width="match_parent" 38 android:layout_height="@dimen/keyboard_quick_switch_taskview_height" 39 android:paddingVertical="@dimen/keyboard_quick_switch_view_spacing" 40 android:alpha="0" 41 android:visibility="gone"> 42 43 <ImageView 44 android:id="@+id/no_recent_items_icon" 45 android:layout_width="@dimen/keyboard_quick_switch_no_recent_items_icon_size" 46 android:layout_height="@dimen/keyboard_quick_switch_no_recent_items_icon_size" 47 android:layout_marginBottom="@dimen/keyboard_quick_switch_no_recent_items_icon_margin" 48 android:src="@drawable/view_carousel" 49 android:tint="@color/materialColorOnSurface" 50 android:importantForAccessibility="no" 51 52 app:layout_constraintVertical_chainStyle="packed" 53 app:layout_constraintTop_toTopOf="parent" 54 app:layout_constraintBottom_toTopOf="@id/no_recent_items_text" 55 app:layout_constraintStart_toStartOf="parent" 56 app:layout_constraintEnd_toEndOf="parent"/> 57 58 <TextView 59 style="@style/KeyboardQuickSwitchText.OnBackground" 60 android:id="@+id/no_recent_items_text" 61 android:layout_width="wrap_content" 62 android:layout_height="wrap_content" 63 android:text="@string/recents_empty_message" 64 65 app:layout_constraintTop_toBottomOf="@id/no_recent_items_icon" 66 app:layout_constraintBottom_toBottomOf="parent" 67 app:layout_constraintStart_toStartOf="parent" 68 app:layout_constraintEnd_toEndOf="parent"/> 69 70 </androidx.constraintlayout.widget.ConstraintLayout> 71 72 <ImageButton 73 android:id="@+id/scroll_button_start" 74 android:src="@drawable/ic_chevron_start" 75 android:contentDescription="@string/quick_switch_scroll_arrow_left" 76 android:background="@drawable/bg_keyboard_quick_switch_scroll_button" 77 android:foreground="@drawable/fg_keyboard_quick_switch_scroll_button" 78 android:tint="@color/keyboard_quick_switch_scroll_button_icon" 79 android:layout_width="@dimen/keyboard_quick_switch_scroll_button_width" 80 android:layout_height="@dimen/keyboard_quick_switch_scroll_button_height" 81 android:paddingHorizontal="@dimen/keyboard_quick_switch_scroll_button_horizontal_padding" 82 android:paddingVertical="@dimen/keyboard_quick_switch_scroll_button_vertical_padding" 83 android:layout_marginStart="@dimen/keyboard_quick_switch_view_spacing" 84 android:visibility="gone" 85 86 app:layout_constraintStart_toStartOf="parent" 87 app:layout_constraintTop_toTopOf="parent" 88 app:layout_constraintBottom_toBottomOf="parent"/> 89 90 <HorizontalScrollView 91 android:id="@+id/scroll_view" 92 android:layout_width="wrap_content" 93 android:layout_height="match_parent" 94 android:fillViewport="true" 95 android:scrollbars="none" 96 android:alpha="0" 97 android:visibility="gone" 98 99 app:layout_constraintHorizontal_bias="0" 100 app:layout_constrainedWidth="true" 101 app:layout_constraintTop_toTopOf="parent" 102 app:layout_constraintBottom_toBottomOf="parent" 103 app:layout_constraintStart_toEndOf="@id/scroll_button_start" 104 app:layout_constraintEnd_toStartOf="@id/scroll_button_end"> 105 106 <androidx.constraintlayout.widget.ConstraintLayout 107 android:id="@+id/content" 108 android:layout_width="wrap_content" 109 android:layout_height="wrap_content" 110 android:paddingVertical="@dimen/keyboard_quick_switch_view_spacing" 111 android:clipToPadding="false"/> 112 113 </HorizontalScrollView> 114 115 <ImageButton 116 android:id="@+id/scroll_button_end" 117 android:src="@drawable/ic_chevron_end" 118 android:contentDescription="@string/quick_switch_scroll_arrow_right" 119 android:background="@drawable/bg_keyboard_quick_switch_scroll_button" 120 android:foreground="@drawable/fg_keyboard_quick_switch_scroll_button" 121 android:tint="@color/keyboard_quick_switch_scroll_button_icon" 122 android:layout_width="@dimen/keyboard_quick_switch_scroll_button_width" 123 android:layout_height="@dimen/keyboard_quick_switch_scroll_button_height" 124 android:paddingHorizontal="@dimen/keyboard_quick_switch_scroll_button_horizontal_padding" 125 android:paddingVertical="@dimen/keyboard_quick_switch_scroll_button_vertical_padding" 126 android:layout_marginEnd="@dimen/keyboard_quick_switch_view_spacing" 127 android:visibility="gone" 128 129 app:layout_constraintBottom_toBottomOf="parent" 130 app:layout_constraintTop_toTopOf="parent" 131 app:layout_constraintEnd_toEndOf="parent" /> 132 133</com.android.launcher3.taskbar.KeyboardQuickSwitchView> 134