Files
lawnchair/res/layout/widgets_list_row_header.xml
Shamali Patwa 1065e89e6e Update font weights for the text in widget list header's selected states
Bug: 398765355
Flag: EXEMPT a11y bug
Test: Screenshot test
Change-Id: Idf20650b8cca70af8d9025197452d457f5dc66ae
2025-03-21 15:33:10 -07:00

81 lines
3.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2021 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.
-->
<com.android.launcher3.widget.picker.WidgetsListHeader xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:launcher="http://schemas.android.com/apk/res-auto"
android:id="@+id/widgets_list_header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:importantForAccessibility="yes"
android:focusable="true"
launcher:appIconSize="48dp"
android:descendantFocusability="afterDescendants"
android:background="@drawable/bg_widgets_header" >
<ImageView
android:id="@+id/app_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:importantForAccessibility="no"
tools:src="@drawable/ic_corp"/>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/app_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/WidgetListHeader.Title"
android:layout_gravity="start|center_vertical"
android:ellipsize="end"
android:maxLines="1"
tools:text="App name" />
<TextView
android:id="@+id/app_subtitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/WidgetListHeader.SubTitle"
android:ellipsize="end"
android:maxLines="1"
tools:text="m widgets, n shortcuts" />
</LinearLayout>
<!-- This checkbox is not clickable. The outermost LinearLayout is responsible to handle all
click event and update the checkbox state. -->
<ImageView
android:duplicateParentState="true"
android:id="@+id/toggle"
android:alpha=".6"
android:src="@drawable/widgets_tray_expand_button"
android:layout_marginHorizontal="16dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_alignParentEnd="true"
android:enabled="false"
android:clickable="false"
android:importantForAccessibility="no" />
</com.android.launcher3.widget.picker.WidgetsListHeader>