mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-27 15:26:58 +00:00
Launcher3: Fix launcher preview rendering
Launcher preview rendering fails on AOSP Launcher3 because the search bar (AppsSearchContainerLayout) tries to find BaseDraggingActivity during inflation, which doesn't exist in the preview hierarchy. Remove the search bar from the launcher preview layout entirely to fix the issue. This is actually more consistent with our real launcher appearance because it doesn't have a search bar to begin with. Change-Id: Ic549fd9d592bc702e0c12285fb016b908e49d514
This commit is contained in:
@@ -39,12 +39,6 @@
|
||||
<com.android.launcher3.InsettableFrameLayout
|
||||
android:id="@+id/apps_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" >
|
||||
|
||||
<include
|
||||
android:id="@id/search_container_all_apps"
|
||||
layout="@layout/search_container_all_apps"/>
|
||||
|
||||
</com.android.launcher3.InsettableFrameLayout>
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</com.android.launcher3.InsettableFrameLayout>
|
||||
@@ -63,7 +63,6 @@ import com.android.launcher3.LauncherSettings;
|
||||
import com.android.launcher3.LauncherSettings.Favorites;
|
||||
import com.android.launcher3.R;
|
||||
import com.android.launcher3.WorkspaceLayoutManager;
|
||||
import com.android.launcher3.allapps.SearchUiManager;
|
||||
import com.android.launcher3.config.FeatureFlags;
|
||||
import com.android.launcher3.folder.FolderIcon;
|
||||
import com.android.launcher3.icons.BaseIconFactory;
|
||||
@@ -511,12 +510,6 @@ public class LauncherPreviewRenderer {
|
||||
mWorkspace.addViewToCellLayout(qsb, 0, R.id.search_container_workspace, lp, true);
|
||||
}
|
||||
|
||||
// Setup search view
|
||||
SearchUiManager searchUiManager =
|
||||
mRootView.findViewById(R.id.search_container_all_apps);
|
||||
mRootView.findViewById(R.id.apps_view).setTranslationY(
|
||||
mDp.heightPx - searchUiManager.getScrollRangeDelta(mInsets));
|
||||
|
||||
measureView(mRootView, mDp.widthPx, mDp.heightPx);
|
||||
dispatchVisibilityAggregated(mRootView, true);
|
||||
measureView(mRootView, mDp.widthPx, mDp.heightPx);
|
||||
|
||||
Reference in New Issue
Block a user