Example #1
0
        public boolean onLongClick(View v) {
          eraserButton.setChecked(true);
          Vibrator vibrator = (Vibrator) getContext().getSystemService(Context.VIBRATOR_SERVICE);
          vibrator.vibrate(40);
          mEraseMenuWindow.show();

          return true;
        }
Example #2
0
        public void onClick(View v) {
          if (mEraseMenuWindow.lastClosedByAnchorTouch() == true) {
            return;
          }

          if (eraserButton.previousStateWasChecked()) {
            Vibrator vibrator = (Vibrator) getContext().getSystemService(Context.VIBRATOR_SERVICE);
            vibrator.vibrate(40);
            mEraseMenuWindow.show();
          }
        }