Android 9 shields the Launcher interface search box

  • Find the following XML file

packages/apps/Launcher3/res/layout/search_container_workspace.xml

Find android:namethe fragment whose attribute value is the following data, and comment out all the fragments

android:name=com.android.launcher3.qsb.QsbContainerView$QsbFragment
  • Find the following Java source files

packages/apps/Launcher3/src/com/android/launcher3/Workspace.java

Find the bindAndInitFirstWorkspaceScreen method and remove the following code segment

CellLayout.LayoutParams lp = new CellLayout.LayoutParams(0, 0, firstPage.getCountX(), 1);
lp.canReorder = false;
if (!firstPage.addViewToCellLayout(qsb, 0, R.id.search_container_workspace, lp, true)) {
    
    
    Log.e(TAG, "Failed to add to item at (0, 0) to CellLayout");
}	

Guess you like

Origin blog.csdn.net/weixin_41388144/article/details/109368361