Launcher3.apk 是android系統(tǒng)的桌面應(yīng)用凫海。其源碼在frameworks/base/packages/apps目錄下。其apk在設(shè)備上的位置:/system/priv-app/Launcher3/彪杉。
launcher3\src\main\java\com\android\launcher3\Launcher.java
private void setupViews() {
...
mSearchDropTargetBar = (SearchDropTargetBar)
mDragLayer.findViewById(R.id.search_drop_target_bar);
//隱藏首頁(yè)搜索欄
mSearchDropTargetBar.setVisibility(View.GONE);
....
}
同一熱鍵在水平方向
1 修改launcher3\src\main\res\values\config.xml
<!-- android會(huì)根據(jù)不同設(shè)備水平或垂直顯示熱鍵的方向,在此改為false牵咙,表示統(tǒng)一水平派近,不轉(zhuǎn)置 -->
<bool name="hotseat_transpose_layout_with_orientation">false</bool>
2 修改Launcher64\launcher3\src\main\java\com\android\launcher3\Hotseat.java
protected void onFinishInflate() {
...
mAllAppsButtonRank = grid.hotseatAllAppsRank;
mContent = (CellLayout) findViewById(R.id.layout);
//本來(lái)判斷設(shè)備是那種布局和類(lèi)型,決定橫向還是豎向的排布熱鍵
/* if (grid.isLandscape && !grid.isLargeTablet()) {
mContent.setGridSize(1, (int) grid.numHotseatIcons);
} else {
mContent.setGridSize((int) grid.numHotseatIcons, 1);
}*/
//改成都水平排布洁桌,即一行多列
mContent.setGridSize((int) grid.numHotseatIcons, 1);
mContent.setIsHotseat(true);
resetLayout();
}
修改launcher3\src\main\res\values\config.xml
<!--允許屏幕旋轉(zhuǎn)-->
<bool name="allow_rotation">true</bool>
修改launcher3\src\main\java\com\android\launcher3\LauncherClings.java
//不顯示開(kāi)機(jī)小提示
private static final boolean DISABLE_CLINGS = true;