コード例 #1
0
 @Override
 public void onClick(View v) {
   if (v.getId() == R.id.wp8_menu) {
     mLauncher.changeAllAppMode(false);
     mLauncher.closeAllApps(true);
     mLauncher.showAllApps(true);
   } else if (v.getId() == R.id.wp8_arrow) {
     mLauncher.closeAllApps(true);
   }
 }
コード例 #2
0
  protected void onAnimationEnd() {
    if (!isVisible()) {
      setVisibility(View.GONE);
      mGrid.setAdapter(null);
      mZoom = 0.0f;
    } else {
      mZoom = 1.0f;
    }

    mLauncher.zoomed(mZoom);
  }
コード例 #3
0
  public boolean onKey(View v, int keyCode, KeyEvent event) {
    if (!isVisible()) return false;

    switch (keyCode) {
      case KeyEvent.KEYCODE_BACK:
        mLauncher.closeAllApps(true);
        return false;
      default:
        return false;
    }
  }
コード例 #4
0
  public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {
    if (!view.isInTouchMode()) {
      return false;
    }

    ApplicationInfo app = (ApplicationInfo) parent.getItemAtPosition(position);
    app = new ApplicationInfo(app);

    mDragController.startDrag(view, this, app, DragController.DRAG_ACTION_COPY);
    mLauncher.closeAllApps(true);

    return true;
  }
コード例 #5
0
 @Override
 public void onItemClick(AdapterView<?> parent, View v, int position, long id) {
   ApplicationInfo app = (ApplicationInfo) parent.getItemAtPosition(position);
   mLauncher.startActivitySafely(app.intent, app);
 }