ListView menu
"A", "B", "C", and "D" I'd like to put a limit on touch events for "D" aside from the rest
For example,
To limit the menu activation by pressing the Menu key 5 times while pressing the Menu key 5 times, How should I walk?
listview clickevent
Assuming that you are saving boolean for the conditions you mentioned,
boolean isActivation;
view.setOnClickListener(new View.OnClickListener{
@Override
public void onClick(View v){
if(!isActiovation) return;
//do something
}
});
It can be implemented as above. You can also think of ways to not install ClickListener or prevent touchEvent itself.
© 2024 OneMinuteCode. All rights reserved.