在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. Android(安卓)declare-styleable:自定义控件的属性(attr.xml,Type
  2. Android用xml写动画效果
  3. Android(安卓)属性系统 详解
  4. RelativeLayout布局,以及部分常用属性介绍scaleType/gravity/layo
  5. android 连接USB按power键锁屏2声锁屏音
  6. android intent.setType("type");的含义
  7. 转 Android中shape中的属性大全
  8. RelativeLayout相对布局中的属性
  9. android 动画

随机推荐

  1. [置顶] android adb网络调试 Android中使
  2. Android Camera2 之 CameraManager 详解
  3. Androidの解决ViewFlipper与ScrollView滑
  4. 用emulator启动模拟器
  5. 一些资料,binder,content provider
  6. Android - 实训项目总结
  7. ADT在线安装(http://dl-ssl.google.com/an
  8. Linux中source命令,在Android build 中的
  9. Android WIFI状态监控
  10. Android横竖屏切换Activity生命周期