Johann Mitlöhner 2012
x.setOnLongClickListener(new OnLongClickListener() { public boolean onLongClick(View v) { // do some work return true; } });