i have an application with an imagebutton that has both an onclick and an onlongclick listener. However, when the button is long pressed, both of these listeners are executing. Any suggestions?
d1.setOnLongClickListener(new OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
selectMode = true;
dockNum = 1;
sd1.open();
d1.cancelLongPress();
return false;
}
});
...d1.setOnClickListener(this);
...case R.id.d1:
if(d1s.equals("empty")) {
selectMode = true;
dockNum = 1;
sd1.open();
} else {
Intent d1i = pm.getLaunchIntentForPackage(d1s);
startActivity(d1i);
}
break;