Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 984e0d0a authored by Samuel Fufa's avatar Samuel Fufa
Browse files

Show settings icon at start of settings results

Bug: 170792963
Test: Manual
Screenshot: https://screenshot.googleplex.com/MVBtDZGtQ3aChwU
Change-Id: I16a28a7bd9e3129b40102e020cd7c0111e6fe29b
parent d15915f5
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -40,13 +40,13 @@
            android:gravity="start|center_vertical"
            android:textAlignment="viewStart"
            android:textColor="?android:attr/textColorPrimary"
            android:textSize="@dimen/settings_hero_title_size" />
            android:textSize="@dimen/search_hero_title_size" />

        <TextView
            android:layout_width="wrap_content"
            android:id="@+id/desc"
            android:textColor="?android:attr/textColorTertiary"
            android:textSize="@dimen/settings_hero_subtitle_size"
            android:textSize="@dimen/search_hero_subtitle_size"
            android:layout_height="wrap_content" />
    </LinearLayout>

@@ -57,7 +57,7 @@
        android:layout_height="match_parent"
        android:gravity="start|center_vertical"
        launcher:iconDisplay="shortcut_popup"
        android:textSize="@dimen/settings_hero_subtitle_size"
        android:textSize="@dimen/search_hero_subtitle_size"
        launcher:iconSizeOverride="@dimen/deep_shortcut_icon_size"
        launcher:layoutHorizontal="false" />

@@ -67,7 +67,7 @@
        android:layout_width="@dimen/deep_shortcut_icon_size"
        android:layout_height="match_parent"
        launcher:iconDisplay="shortcut_popup"
        android:textSize="@dimen/settings_hero_inline_button_size"
        android:textSize="@dimen/search_hero_inline_button_size"
        launcher:iconSizeOverride="@dimen/deep_shortcut_icon_size"
        launcher:layoutHorizontal="false" />

+36 −34
Original line number Diff line number Diff line
@@ -18,30 +18,34 @@
    android:background="?android:attr/selectableItemBackground"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:orientation="horizontal"
    android:gravity="center_vertical"
    android:padding="4dp"
    android:minHeight="48dp"
    android:textColor="?android:attr/textColorPrimary"
    android:textSize="14sp">
    android:padding="@dimen/dynamic_grid_cell_padding_x"
    android:textColor="?android:attr/textColorPrimary">

    <TextView
        android:id="@+id/title"
        style="@style/TextTitle"
        android:layout_width="wrap_content"
    <View
        android:layout_width="@dimen/search_settings_icon_size"
        android:src="@drawable/ic_setting"
        android:id="@+id/icon"
        android:layout_height="@dimen/search_settings_icon_size" />

    <LinearLayout
        android:layout_width="0dp"
        android:orientation="vertical"
        android:paddingRight="@dimen/dynamic_grid_cell_padding_x"
        android:paddingLeft="@dimen/dynamic_grid_cell_padding_x"
        android:layout_height="wrap_content"
        android:layout_marginBottom="4dp"
        android:textColor="?android:attr/textColorPrimary"
        android:textSize="16sp" />
        android:layout_weight="1">


        <TextView
        android:id="@+id/description"
            android:id="@+id/title"
            style="@style/TextTitle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
        android:visibility="gone"
            android:layout_marginBottom="@dimen/search_line_spacing"
            android:textColor="?android:attr/textColorPrimary"
        android:textSize="14sp" />
            android:textSize="@dimen/search_hero_title_size" />

        <TextView
            android:id="@+id/breadcrumbs"
@@ -49,9 +53,7 @@
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:visibility="gone"
        android:alpha=".7"
            android:textColor="?android:attr/textColorSecondary"
        android:textSize="14sp" />


            android:textSize="@dimen/search_hero_subtitle_size" />
    </LinearLayout>
</com.android.launcher3.views.SearchSettingsRowView>
 No newline at end of file
+26 −5
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2020 The Android Open Source Project
<?xml version="1.0" encoding="utf-8"?><!-- Copyright (C) 2020 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.
@@ -13,7 +12,29 @@
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<androidx.slice.widget.SliceView xmlns:android="http://schemas.android.com/apk/res/android"
<com.android.launcher3.views.SearchResultSettingsSlice xmlns:android="http://schemas.android.com/apk/res/android"
    android:paddingHorizontal="@dimen/dynamic_grid_cell_padding_x"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <FrameLayout
        android:layout_width="wrap_content"
        android:paddingTop="@dimen/search_settings_icon_vertical_offset"
        android:layout_height="wrap_content">

        <View
            android:layout_width="@dimen/search_settings_icon_size"
            android:src="@drawable/ic_setting"
            android:id="@+id/icon"
            android:layout_height="@dimen/search_settings_icon_size" />
    </FrameLayout>

    <androidx.slice.widget.SliceView
        android:id="@+id/slice"
        android:layout_height="wrap_content"
    android:paddingHorizontal="4dp" />
 No newline at end of file
        android:layout_weight="1"
        android:layout_marginStart="@dimen/dynamic_grid_cell_padding_x"
        android:layout_width="0dp" />

</com.android.launcher3.views.SearchResultSettingsSlice>
+6 −3
Original line number Diff line number Diff line
@@ -249,8 +249,11 @@
    <dimen name="bottom_sheet_edu_padding">24dp</dimen>

    <!-- Search related -->
    <dimen name="settings_hero_title_size">16sp</dimen>
    <dimen name="settings_hero_subtitle_size">15sp</dimen>
    <dimen name="settings_hero_inline_button_size">12sp</dimen>
    <dimen name="search_hero_title_size">16sp</dimen>
    <dimen name="search_hero_subtitle_size">15sp</dimen>
    <dimen name="search_hero_inline_button_size">12sp</dimen>
    <dimen name="search_settings_icon_size">36dp</dimen>
    <dimen name="search_settings_icon_vertical_offset">16dp</dimen>
    <dimen name="search_line_spacing">4dp</dimen>

</resources>
+1 −17
Original line number Diff line number Diff line
@@ -37,7 +37,6 @@ import androidx.core.view.accessibility.AccessibilityNodeInfoCompat;
import androidx.core.view.accessibility.AccessibilityRecordCompat;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.slice.widget.SliceView;

import com.android.launcher3.BaseDraggingActivity;
import com.android.launcher3.BubbleTextView;
@@ -47,7 +46,6 @@ import com.android.launcher3.allapps.search.SearchSectionInfo;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.model.data.AppInfo;
import com.android.launcher3.util.PackageManagerHelper;
import com.android.launcher3.views.SearchSliceWrapper;
import com.android.systemui.plugins.shared.SearchTarget;

import java.util.List;
@@ -461,17 +459,10 @@ public class AllAppsGridAdapter extends
                } else {
                    searchView.setVisibility(View.GONE);
                }
                break;
            case VIEW_TYPE_SEARCH_SLICE:
                SliceView sliceView = (SliceView) holder.itemView;
                SearchAdapterItem slicePayload = (SearchAdapterItem) mApps.getAdapterItems().get(
                        position);
                SearchTarget searchTarget = slicePayload.getSearchTarget();
                sliceView.setTag(new SearchSliceWrapper(mLauncher, sliceView, searchTarget));

                break;
            case VIEW_TYPE_SEARCH_CORPUS_TITLE:
            case VIEW_TYPE_SEARCH_ROW_WITH_BUTTON:
            case VIEW_TYPE_SEARCH_SLICE:
            case VIEW_TYPE_SEARCH_ROW:
            case VIEW_TYPE_SEARCH_ICON:
            case VIEW_TYPE_SEARCH_ICON_ROW:
@@ -496,13 +487,6 @@ public class AllAppsGridAdapter extends
        if (holder.itemView instanceof AllAppsSectionDecorator.SelfDecoratingView) {
            ((AllAppsSectionDecorator.SelfDecoratingView) holder.itemView).removeDecoration();
        }
        if (holder.itemView instanceof SliceView) {
            SliceView sliceView = (SliceView) holder.itemView;
            if (sliceView.getTag() instanceof SearchSliceWrapper) {
                ((SearchSliceWrapper) sliceView.getTag()).destroy();
            }
            sliceView.setTag(null);
        }
    }

    @Override
Loading