title: android imageview long press and regular press
body: <p>I have an imageview where I need to have both long presses (for a context menu) and regular presses working. I can get one or the other working, but not both. What did I miss? The code below only works for regular presses. As soon as I touch the screen, it starts executing the onTouch code.</p>
  
  <pre><code> ImageView image = (ImageView)findViewById(R.id.visible_image);
   image.setLongClickable(true);
   image.setOnTouchListener(new OnTouchListener() {
      public boolean onTouch(View v, MotionEvent ev) {
          switch (ev.getAction()) {
           case MotionEvent.ACTION_DOWN:
              // disable the screen taps for 500ms
              DecodeActionDownEvent(v, ev, bm2);
           case MotionEvent.ACTION_MOVE:
           case MotionEvent.ACTION_UP:
       }
          return true;
      }
   });
   registerForContextMenu(image);
  </code></pre>
  
  <p>...</p>
  
  <pre><code> @Override
   public void onCreateContextMenu(ContextMenu menu, View v,
       ContextMenuInfo menuInfo) {
      menu.setHeaderTitle("Edit");
      ArrayList&lt;String&gt; menuItems = new ArrayList&lt;String&gt;();
      menuItems.add("Edit page settings");
      menuItems.add("Edit page objects");
      menuItems.add("Edit this object");
      for (int i = 0; i&lt;menuItems.size(); i++) {
          menu.add(Menu.NONE, i, i, menuItems.get(i));
      }
   }
  </code></pre>