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

Commit 1ad3ef3e authored by Adam Cohen's avatar Adam Cohen
Browse files

Fix alignment issue with suggested apps in all apps

-> New RecyclerView handles wrap_content differently
-> Add mock set of suggested apps to the LauncherExtension

issue: 27581978
Change-Id: Id080e212e0425515fa66e821d116b95284bb3526
parent a0088a51
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@
    xmlns:launcher="http://schemas.android.com/apk/res-auto"
    style="@style/Icon.AllApps"
    android:id="@+id/icon"
    android:layout_width="wrap_content"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    android:paddingTop="@dimen/all_apps_prediction_icon_top_padding"
+11 −1
Original line number Diff line number Diff line
package com.android.launcher3.testing;

import android.content.ComponentName;
import android.content.Intent;
import android.graphics.Color;
import android.graphics.Rect;
@@ -11,6 +12,7 @@ import android.widget.FrameLayout;
import com.android.launcher3.AppInfo;
import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherCallbacks;
import com.android.launcher3.compat.UserHandleCompat;
import com.android.launcher3.logging.UserEventLogger;
import com.android.launcher3.allapps.AllAppsSearchBarController;
import com.android.launcher3.util.ComponentKey;
@@ -280,7 +282,15 @@ public class LauncherExtension extends Launcher {

        @Override
        public List<ComponentKey> getPredictedApps() {
            return new ArrayList<>();
            // Return a mock set of predicted apps for UI testing
            ArrayList<ComponentKey> ar = new ArrayList<>();
            for (int i = 0; i < 6; i++) {
                ComponentKey ck = new ComponentKey(new ComponentName("com.android.settings",
                        "com.android.settings.Settings"), UserHandleCompat.myUserHandle());
                ar.add(ck);
            }
            return ar;

        }

        @Override