In my j2me application for blackberry, I have gridfield and when I click on griditems, I want to select that item with highlighting borders around it which i am able to do it. But now i want to open dialog to select sub category on long press on that item.
I am using navigationclick event to select griditem. but not able to detect long press/touch event when I hold for 2 seconds on griditem. So how to detect long press event so that I can open subcategory dialog based on griditem?
below is my code for selection on griditem when click:
public boolean navigationClick(int status, int time) {
isSelected = !isSelected;
listener.categorySelected(id, isSelected);
this.invalidate();
return true;
};
If any idea for double click event then also it's fine for me. I will change functionality for long click to double click in the app.