17 Android9.0开发笔记/系统桌面取消谷歌搜索框

44 次浏览

path: /packages/apps/Launcher3/src/com/android/launcher3/Workspace.java
在函数bindAndInitFirstWorkspaceScreen()屏蔽如下代码:

if (qsb == null) {
    // In transposed layout, we add the QSB in the Grid. As workspace does not touch the
    // edges, we do not need a full width QSB.
    qsb = LayoutInflater.from(getContext())
    .inflate(R.layout.search_container_workspace,firstPage, false);
}
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");
}

发表评论

您的邮箱地址不会被公开。 必填项已用 * 标注

滚动至顶部