转帖请注明:来自http://blog.csdn.net/xufeifandj
同样修改lancher.java里面文件
OnLongclick事件,因为workspace注册了Launcher,OnLongClick事情。Launcher实现了长按的事件。
因此在 注释掉,进入设置界面代码,替换为,跳转到 Widgets里面即可。直接看代码。
public boolean onLongClick(View v) {
if (!isDraggingEnabled()) return false;
if (isWorkspaceLocked()) return false;
if (mState != State.WORKSPACE) return false;
if (v instanceof Workspace) {
//修改长按显示widgets
showAllApps(true, AppsCustomizePagedView.ContentType.Widgets, true);
return true;
// if (!mWorkspace.isInOverviewMode()) {
// if (mWorkspace.enterOverviewMode()) {
// mWorkspace.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS,
//