Launcher3.apk 开发记录

Launcher3.apk 是android系统的桌面应用。其源码在frameworks/base/packages/apps目录下。其apk在设备上的位置:/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);
    //隐藏首页搜索栏
    mSearchDropTargetBar.setVisibility(View.GONE);
    ....
    }

同一热键在水平方向

1 修改launcher3\src\main\res\values\config.xml


false

2 修改Launcher64\launcher3\src\main\java\com\android\launcher3\Hotseat.java

protected void onFinishInflate() {
   ...
    mAllAppsButtonRank = grid.hotseatAllAppsRank;
    mContent = (CellLayout) findViewById(R.id.layout);
    //本来判断设备是那种布局和类型,决定横向还是竖向的排布热键
   /* 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


true

修改launcher3\src\main\java\com\android\launcher3\LauncherClings.java

 //不显示开机小提示
private static final boolean DISABLE_CLINGS = true;

你可能感兴趣的:(Launcher3.apk 开发记录)