1、修改workspace消失动画
从workspace切换到其他界面时,有个workspace缩小的动画,默认缩小到0.7,不够,改成缩小到0.
修改workspace.java中getChangeStateAnimation函数如下部分:
- if (state != State.NORMAL) {
- finalScaleFactor = mSpringLoadedShrinkFactor - (stateIsSmall ? 0.1f : 0);
修改为
- if (state != State.NORMAL) {
- finalScaleFactor = stateIsSmall ? 0 : mSpringLoadedShrinkFactor;
2、QSB bar放到横屏的顶部
把values-land\styles.xml中QSB相关配置替换成values\styles.xml中的配置
然后layout-land\launcher.xml 作如下修改
- <include
- android:id="@+id/qsb_bar"
- layout="@layout/qsb_bar"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="top|center"/>
3、All App页面背景透明
layout\apps_customize_pane.xml 作如下修改
- <com.android.mainmenu.AppsCustomizeTabHost
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:launcher="http://schemas.android.com/apk/res/com.android.mainmenu"
- android:background="#00000000">
- <FrameLayout
- android:id="@+id/animation_buffer"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="#a0000000"
- android:visibility="gone" />
然后修改 updateWallpaperVisibility 这个函数
- void updateWallpaperVisibility(boolean visible) {
- // 增加这一句把背景搞成透明
- visible = true;
- int wpflags = visible ? WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER : 0;
- int curflags = getWindow().getAttributes().flags
- & WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER;
- if (wpflags != curflags) {
- getWindow().setFlags(wpflags, WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER);
- }
- setWorkspaceBackground(visible);
- }
4、去掉HotSeat
1>修改HotSeat.xml文件
- <com.android.mainmenu.Hotseat
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:launcher="http://schemas.android.com/apk/res/com.android.mainmenu"
- launcher:cellCountX="0"
- launcher:cellCountY="1">
2>修改 showOutOfSpaceMessage 这个函数,删掉HotSeat的提示
- void showOutOfSpaceMessage(boolean isHotseatLayout) {
- if (!isHotseatLayout)
- {
- int strId = (isHotseatLayout ? R.string.hotseat_out_of_space : R.string.out_of_space);
- Toast.makeText(this, getString(strId), Toast.LENGTH_SHORT).show();
- }
- }
5、瘦身
1>、删掉res子目录下的所有wallpaper*.jpg
2>、注释掉 AndroidManifest.xml 下的这句话,去掉编辑壁纸功能。
- <!--
- <action android:name="android.intent.action.SET_WALLPAPER" />
- -->
原生800*480 launcher 界面
修改后的界面