mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-27 15:26:58 +00:00
1. Show widget previews in their expected cell sizes.
2. Update the bottom picker to use a table layout rather than
a horizontal scrollbar.
3. Move the title and cell size description to the bottom of
the preview.
Test: Run AddConfigWidgetTest
Manually open full and bottom widgets picker and observe
widget previews.
Video: https://drive.google.com/file/d/1K8A8hK5B4FgPTsX3cb-Yt4a_VjI0pk-w/view?usp=sharing
Bug: 179797520
Change-Id: I938612cb2e2477ce4a3a2d6c8891a0a36fc0978c
59 lines
2.3 KiB
XML
59 lines
2.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- Copyright (C) 2017 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.WidgetsBottomSheet
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
android:orientation="vertical"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:paddingTop="28dp"
|
|
android:background="@drawable/top_round_rect_primary"
|
|
android:elevation="@dimen/deep_shortcuts_elevation"
|
|
android:layout_gravity="bottom"
|
|
android:theme="?attr/widgetsTheme">
|
|
|
|
<TextView
|
|
style="@style/TextHeadline"
|
|
android:id="@+id/title"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:gravity="center_horizontal"
|
|
android:textColor="?android:attr/textColorPrimary"
|
|
android:textSize="24sp"/>
|
|
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:gravity="center_horizontal"
|
|
android:paddingTop="4dp"
|
|
android:fontFamily="sans-serif"
|
|
android:textColor="?android:attr/textColorTertiary"
|
|
android:textSize="14sp"
|
|
android:text="@string/long_press_widget_to_add"/>
|
|
|
|
<ScrollView
|
|
android:id="@+id/widgets_table_scroll_view"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="45dp"
|
|
android:layout_marginBottom="40dp">
|
|
<include layout="@layout/widgets_table_container"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center_horizontal" />
|
|
</ScrollView>
|
|
|
|
</com.android.launcher3.widget.WidgetsBottomSheet> |