How Can I Prevent Activation For Some Listview Items When The Selection Mode Is Multichoicemodal?
I have a customized GridView populated by a customized BaseAdapter. The selection mode of the GridView is MultiChoiceModal. I want to control which items can be activated when lo
Solution 1:
I have found a simple solution:
view.setOnLongClickListener(newView.OnLongClickListener() {
@OverridepublicbooleanonLongClick(View v) {
returntrue;
}
});
or
view.setOnTouchListener(newView.OnTouchListener() {
@OverridepublicbooleanonTouch(View v, MotionEvent event) {
returntrue;
}
});
where view
is the item where you want to prevent a choice mode activation after a long click.
Post a Comment for "How Can I Prevent Activation For Some Listview Items When The Selection Mode Is Multichoicemodal?"