Implement Tooltips widget for QS panel
- Show the illustration and QS tile label text - Dynamic update popup window width by content - Support the auto close timer API Bug: 210353709 Test: make RunSettingsRoboTests ROBOTEST_FILTER=AccessibilityQuickSettingsTooltipWindowTest Change-Id: I8e0d3ff4ef6a48a54ef1e80724002d2cd28d7ac3
This commit is contained in:
42
res/layout/accessibility_qs_tooltips.xml
Normal file
42
res/layout/accessibility_qs_tooltips.xml
Normal file
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2022 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/accessibility_qs_tooltips_background">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/accessibility_qs_tooltips_margin_top"
|
||||
android:src="@drawable/accessibility_qs_tooltips_illustration"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:contentDescription="@null" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/qs_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/accessibility_qs_tooltips_margin"
|
||||
android:textColor="@android:color/black"
|
||||
android:fontFamily="@*android:string/config_headlineFontFamilyMedium"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
Reference in New Issue
Block a user