在launcher.java中在createShortcut方法中   屏蔽所有应用按钮
改动之前
View createShortcut(int layoutResId, ViewGroup parent, ShortcutInfo info) {
BubbleTextView favorite = (BubbleTextView) mInflater.inflate(
layoutResId, parent, false);
favorite.applyFromShortcutInfo(info, mIconCache);
favorite.setOnClickListener(this);
if (info.itemType == LauncherSettings.Favorites.ITEM_TYPE_ALLAPPS
&& info.getIcon(mIconCache) == null) {
// All apps icon
// Drawable d =
// getResources().getDrawable(R.drawable.all_apps_button_icon);
Drawable d = mHotseat.getAppsButtonBitmap();// qijinling

Utilities.resizeIconDrawable(d);
favorite.setCompoundDrawables(null, d, null, null);
favorite.setOnTouchListener(getHapticFeedbackTouchListener());
}
Utilities.applyTypeface(favorite);
return favorite;
}




改动之后
 */
View createShortcut(int layoutResId, ViewGroup parent, ShortcutInfo info) {
BubbleTextView favorite = (BubbleTextView) mInflater.inflate(
layoutResId, parent, false);
favorite.applyFromShortcutInfo(info, mIconCache);
favorite.setOnClickListener(this);
if (info.itemType == LauncherSettings.Favorites.ITEM_TYPE_ALLAPPS
&& info.getIcon(mIconCache) == null) {
// All apps icon
Drawable d = getResources().getDrawable(
R.drawable.all_apps_button_icon);


// 隐藏菜单
favorite.setWidth(0);
favorite.setHeight(0);
favorite.setVisibility(View.GONE);
Utilities.resizeIconDrawable(d);
favorite.setCompoundDrawables(null, d, null, null);
favorite.setOnTouchListener(getHapticFeedbackTouchListener());
}
Utilities.applyTypeface(favorite);
return favorite;
}










然后在AppsCustomizePagedView类中 找到DISABLE_ALL_APPS 属性




  //无抽屉true  同理反之
    public static boolean DISABLE_ALL_APPS = true;   属性设置 TRUE 或者FAULE

更多相关文章

  1. RelativeLayout布局,以及部分常用属性介绍scaleType/gravity/layo
  2. Android 属性系统 详解
  3. Android declare-styleable:自定义控件的属性(attr.xml,TypedArra
  4. 转 Android中shape中的属性大全
  5. RelativeLayout相对布局中的属性
  6. 【android开发】styles.xml常用的设置属性汇总

随机推荐

  1. Android工程中javax.annotation.Nullable
  2. 二十、Android(安卓)-- SDcard文件读取和
  3. Android平台开发-WIFI function porting-
  4. android--Airbnb 动画库Lottie
  5. Mac 下载 编译 debug Android(安卓)源码
  6. Android引入外部字体更改APP字体
  7. android Android Framework
  8. 『Android/Java』Android Studio XML Edi
  9. android AVD启动后停止在android界面
  10. 安装Android(安卓)Source【转】