Android Launcher 如何去掉主菜單,所有應用擺在案頭,類似小米案頭

來源:互聯網
上載者:User

 

 

Launcher3/src/com/android/launcher3/ 1. AppsCustomizePagedView.java public static boolean DISABLE_ALL_APPS = true; //mtk modify 2. AppsCustomizePagedView.java
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
int width = MeasureSpec.getSize(widthMeasureSpec);
int height = MeasureSpec.getSize(heightMeasureSpec);
LauncherLog.d(TAG, onMeasure mIsInEditMode = + mIsInEditMode + widthMeasureSpec + + heightMeasureSpec
+ + width + + height);
if (!isDataReady()) {
LauncherLog.d(TAG, onMeasure DISABLE_ALL_APPS is + DISABLE_ALL_APPS
+ !mApps.isEmpty() is + !mApps.isEmpty()
+ !mWidgets.isEmpty() + !mWidgets.isEmpty());
if ((DISABLE_ALL_APPS || (!mApps.isEmpty() && mAppsHasSet)) && !mWidgets.isEmpty()) { //mtk modify
setDataIsReady();
setMeasuredDimension(width, height);
onDataReady(width, height);
}
} super.onMeasure(widthMeasureSpec, heightMeasureSpec);
} 3.Launcher.java private void showAppsCustomizeHelper(final boolean animated, final boolean springLoaded,
final AppsCustomizePagedView.ContentType contentType) {
......
// Shrink workspaces away if going to AppsCustomize from workspace
Animator workspaceAnim =
mWorkspace.getChangeStateAnimation(Workspace.State.SMALL, animated);
//if (!AppsCustomizePagedView.DISABLE_ALL_APPS) { //mtk modify
// Set the content type for the all apps space
mAppsCustomizeTabHost.setContentTypeImmediate(contentType);
//} //mtk modify
......
}
4. default_workspace.xml檔案(這個檔案很多重路徑有,請確保修改到正確的檔案,例如)mediatek/operator/有) 這個檔案會配置hotseat的表徵圖,預設不會配置screen為2的位置,這是原來的allapp button,做了此客制化後就需要配置screen2,而不能配置screen 4,因此,請對應修改原來4個hotseat表徵圖的screen id,從0到3.

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.