mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 02:38:20 +00:00
Add a 3 dot vertical menu and styles (child cl makes it functional)
Bug: 347288851 Flag: EXEMPT standalone picker Test: Manual Change-Id: I99985098034f6336f683b1ff3a47dce2aa8e596a
This commit is contained in:
26
res/drawable/ic_more_vert_dots.xml
Normal file
26
res/drawable/ic_more_vert_dots.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<!--
|
||||
~ Copyright (C) 2024 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.
|
||||
-->
|
||||
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M12,8c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM12,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM12,16c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2z" />
|
||||
</vector>
|
||||
@@ -55,18 +55,39 @@
|
||||
android:clipToOutline="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
<LinearLayout
|
||||
android:id="@+id/search_bar_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:background="?attr/widgetPickerPrimarySurfaceColor"
|
||||
android:clipToPadding="false"
|
||||
android:elevation="0.1dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:gravity="center_vertical"
|
||||
launcher:layout_sticky="true">
|
||||
<FrameLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:clipToPadding="false"
|
||||
android:elevation="0.1dp"
|
||||
android:paddingBottom="8dp">
|
||||
|
||||
<include layout="@layout/widgets_search_bar" />
|
||||
</FrameLayout>
|
||||
<include layout="@layout/widgets_search_bar" />
|
||||
</FrameLayout>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/widget_picker_widget_options_menu"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="@drawable/full_rounded_transparent_ripple"
|
||||
android:contentDescription="@string/widget_picker_widget_options_button_description"
|
||||
android:padding="12dp"
|
||||
android:src="@drawable/ic_more_vert_dots"
|
||||
android:visibility="gone"
|
||||
android:tint="?attr/widgetPickerWidgetOptionsMenuColor" />
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -39,19 +39,40 @@
|
||||
android:clipToOutline="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
<LinearLayout
|
||||
android:id="@+id/search_bar_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:background="?attr/widgetPickerPrimarySurfaceColor"
|
||||
android:clipToPadding="false"
|
||||
android:elevation="0.1dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:paddingHorizontal="@dimen/widget_list_horizontal_margin_two_pane"
|
||||
launcher:layout_sticky="true">
|
||||
<FrameLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:clipToPadding="false"
|
||||
android:elevation="0.1dp"
|
||||
android:paddingBottom="16dp">
|
||||
|
||||
<include layout="@layout/widgets_search_bar" />
|
||||
</FrameLayout>
|
||||
<include layout="@layout/widgets_search_bar" />
|
||||
</FrameLayout>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/widget_picker_widget_options_menu"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="@drawable/full_rounded_transparent_ripple"
|
||||
android:contentDescription="@string/widget_picker_widget_options_button_description"
|
||||
android:padding="12dp"
|
||||
android:src="@drawable/ic_more_vert_dots"
|
||||
android:visibility="gone"
|
||||
android:tint="?attr/widgetPickerWidgetOptionsMenuColor" />
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -27,4 +27,7 @@
|
||||
@android:color/system_on_surface_dark</color>
|
||||
<color name="widget_cell_subtitle_color_dark">
|
||||
@android:color/system_on_surface_variant_dark</color>
|
||||
<color name="widget_picker_menu_options_color_dark">
|
||||
@android:color/system_on_surface_variant_dark
|
||||
</color>
|
||||
</resources>
|
||||
|
||||
@@ -27,4 +27,7 @@
|
||||
@android:color/system_on_surface_light</color>
|
||||
<color name="widget_cell_subtitle_color_light">
|
||||
@android:color/system_on_surface_variant_light</color>
|
||||
<color name="widget_picker_menu_options_color_light">
|
||||
@android:color/system_on_surface_variant_light
|
||||
</color>
|
||||
</resources>
|
||||
|
||||
@@ -62,6 +62,7 @@
|
||||
<attr name="preloadIconBackgroundColor" format="color" />
|
||||
<attr name="widgetPickerTitleColor" format="color"/>
|
||||
<attr name="widgetPickerDescriptionColor" format="color"/>
|
||||
<attr name="widgetPickerWidgetOptionsMenuColor" format="color"/>
|
||||
<attr name="widgetPickerPrimarySurfaceColor" format="color"/>
|
||||
<attr name="widgetPickerSecondarySurfaceColor" format="color"/>
|
||||
<attr name="widgetPickerHeaderAppTitleColor" format="color"/>
|
||||
|
||||
@@ -105,6 +105,7 @@
|
||||
<color name="widget_picker_secondary_surface_color_light">#FAF9F8</color>
|
||||
<color name="widget_picker_title_color_light">#1F1F1F</color>
|
||||
<color name="widget_picker_description_color_light">#4C4D50</color>
|
||||
<color name="widget_picker_menu_options_color_light">@color/material_color_on_surface_variant</color>
|
||||
<color name="widget_picker_header_app_title_color_light">#1F1F1F</color>
|
||||
<color name="widget_picker_header_app_subtitle_color_light">#444746</color>
|
||||
<color name="widget_picker_header_background_color_light">#C2E7FF</color>
|
||||
@@ -125,6 +126,7 @@
|
||||
<color name="widget_picker_secondary_surface_color_dark">#393939</color>
|
||||
<color name="widget_picker_title_color_dark">#E3E3E3</color>
|
||||
<color name="widget_picker_description_color_dark">#CCCDCF</color>
|
||||
<color name="widget_picker_menu_options_color_dark">@color/material_color_on_surface_variant</color>
|
||||
<color name="widget_picker_header_app_title_color_dark">#E3E3E3</color>
|
||||
<color name="widget_picker_header_app_subtitle_color_dark">#C4C7C5</color>
|
||||
<color name="widget_picker_header_background_color_dark">#004A77</color>
|
||||
|
||||
@@ -61,6 +61,9 @@
|
||||
<string name="long_press_widget_to_add">Touch & hold to move a widget.</string>
|
||||
<!-- Accessibility spoken hint message in widget picker, which allows user to add a widget. Custom action is the label for additional accessibility actions available in this mode [CHAR_LIMIT=100] -->
|
||||
<string name="long_accessible_way_to_add">Double-tap & hold to move a widget or use custom actions.</string>
|
||||
<!-- Accessibility label for the icon button shown in the widget picker that opens a overflow
|
||||
menu with widgets viewing options. [CHAR_LIMIT=25] -->
|
||||
<string name="widget_picker_widget_options_button_description">More options</string>
|
||||
<!-- The format string for the dimensions of a widget in the drawer -->
|
||||
<!-- There is a special version of this format string for Farsi -->
|
||||
<string name="widget_dims_format">%1$d \u00d7 %2$d</string>
|
||||
|
||||
@@ -244,6 +244,7 @@
|
||||
@color/widget_picker_secondary_surface_color_light</item>
|
||||
<item name="widgetPickerTitleColor">@color/widget_picker_title_color_light</item>
|
||||
<item name="widgetPickerDescriptionColor">@color/widget_picker_description_color_light</item>
|
||||
<item name="widgetPickerWidgetOptionsMenuColor">@color/widget_picker_menu_options_color_light</item>
|
||||
<item name="widgetPickerHeaderAppTitleColor">
|
||||
@color/widget_picker_header_app_title_color_light</item>
|
||||
<item name="widgetPickerHeaderAppSubtitleColor">
|
||||
@@ -284,6 +285,7 @@
|
||||
<item name="widgetPickerTitleColor">
|
||||
@color/widget_picker_title_color_dark</item>
|
||||
<item name="widgetPickerDescriptionColor">@color/widget_picker_description_color_dark</item>
|
||||
<item name="widgetPickerWidgetOptionsMenuColor">@color/widget_picker_menu_options_color_dark</item>
|
||||
<item name="widgetPickerHeaderAppTitleColor">
|
||||
@color/widget_picker_header_app_title_color_dark</item>
|
||||
<item name="widgetPickerHeaderAppSubtitleColor">
|
||||
|
||||
Reference in New Issue
Block a user