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

Commit 9968ed09 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Adding listener support for color extraction changes Changing the...

Merge "Adding listener support for color extraction changes Changing the apps-search layout to use theme attribute instead of hard coded layout id" into ub-launcher3-dorval-polish
parents e37d2b9f 60820d79
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -59,13 +59,15 @@
        <!-- Fast scroller popup -->
        <TextView
            style="@style/FastScrollerPopup"
            android:layout_below="@+id/search_container"
            android:layout_alignTop="@+id/apps_list_view"
            android:id="@+id/fast_scroller_popup"
            android:layout_alignParentEnd="true"
            android:layout_marginEnd="@dimen/container_fastscroll_popup_margin" />

        <!-- Note: we are reusing/repurposing a system attribute for search layout, because of a
         platform bug, which prevents using custom attributes in <include> tag -->
        <include
            layout="@layout/all_apps_search_container"
            layout="?android:attr/keyboardLayout"
            android:id="@+id/search_container" />

    </com.android.launcher3.allapps.AllAppsRecyclerViewContainerView>
+3 −3
Original line number Diff line number Diff line
@@ -15,28 +15,28 @@
-->
<com.android.launcher3.allapps.search.AppsSearchContainerLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/search_container"
    android:layout_width="match_parent"
    android:layout_height="@dimen/all_apps_search_bar_height"
    android:layout_gravity="center|top"
    android:gravity="center|bottom"
    android:id="@+id/search_container"
    android:saveEnabled="false">

    <com.android.launcher3.ExtendedEditText
        android:id="@+id/search_box_input"
        android:layout_width="match_parent"
        android:layout_height="@dimen/all_apps_search_bar_field_height"
        android:background="@android:color/transparent"
        android:layout_gravity="bottom"
        android:background="@android:color/transparent"
        android:focusableInTouchMode="true"
        android:gravity="center"
        android:hint="@string/all_apps_search_bar_hint"
        android:imeOptions="actionSearch|flagNoExtractUi"
        android:inputType="text|textNoSuggestions|textCapWords"
        android:maxLines="1"
        android:scrollHorizontally="true"
        android:singleLine="true"
        android:textColor="?android:attr/textColorSecondary"
        android:hint="@string/all_apps_search_bar_hint"
        android:textColorHint="@drawable/all_apps_search_hint"
        android:textSize="16sp" />
</com.android.launcher3.allapps.search.AppsSearchContainerLayout>
 No newline at end of file
+1 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@
        <item name="android:windowNoTitle">true</item>
        <item name="android:windowActionModeOverlay">true</item>
        <item name="android:colorEdgeEffect">?android:attr/textColorSecondary</item>
        <item name="android:keyboardLayout">@layout/all_apps_search_container</item>
    </style>

    <!-- Workspace -->
+1 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@
        <item name="android:windowShowWallpaper">true</item>
        <item name="android:windowNoTitle">true</item>
        <item name="android:colorEdgeEffect">#FF757575</item>
        <item name="android:keyboardLayout">@layout/all_apps_search_container</item>
    </style>

    <style name="LauncherTheme" parent="@style/BaseLauncherTheme"></style>
+4 −9
Original line number Diff line number Diff line
@@ -212,6 +212,8 @@ public class Launcher extends BaseActivity
    private static int NEW_APPS_ANIMATION_INACTIVE_TIMEOUT_SECONDS = 5;
    @Thunk static int NEW_APPS_ANIMATION_DELAY = 500;

    private final ExtractedColors mExtractedColors = new ExtractedColors();

    @Thunk Workspace mWorkspace;
    private View mLauncherView;
    @Thunk DragLayer mDragLayer;
@@ -260,7 +262,6 @@ public class Launcher extends BaseActivity
    private LauncherModel mModel;
    private ModelWriter mModelWriter;
    private IconCache mIconCache;
    private ExtractedColors mExtractedColors;
    private LauncherAccessibilityDelegate mAccessibilityDelegate;
    private Handler mHandler = new Handler();
    private boolean mIsResumeFromActionScreenOff;
@@ -392,11 +393,10 @@ public class Launcher extends BaseActivity
        // LauncherModel load.
        mPaused = false;

        mLauncherView = getLayoutInflater().inflate(R.layout.launcher, null);
        mLauncherView = LayoutInflater.from(this).inflate(R.layout.launcher, null);

        setupViews();
        mDeviceProfile.layout(this, false /* notifyListeners */);
        mExtractedColors = new ExtractedColors();
        loadExtractedColorsAndColorItems();

        mPopupDataProvider = new PopupDataProvider(this);
@@ -465,12 +465,7 @@ public class Launcher extends BaseActivity
    @Override
    public void onExtractedColorsChanged() {
        loadExtractedColorsAndColorItems();
        if (mAllAppsController != null) {
            mAllAppsController.onExtractedColorsChanged();
        }
        if (mLauncherCallbacks != null) {
            mLauncherCallbacks.onExtractedColorsChanged();
        }
        mExtractedColors.notifyChange();
    }

    public ExtractedColors getExtractedColors() {
Loading