Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Developer
david_schwartz_bb
Posts: 137
Registered: ‎02-04-2010
My Device: Tour 9630
My Carrier: verizon
Accepted Solution

Handling navigationClick for a BitmapField

I have a BitmapField that should call a method when the user taps it I am trying to stop any further activity from happening after the method is called. It seems like the click is being passed through to the form.

 

filterField = new BitmapField(Bitmap.getBitmapResource("filter.png"), Field.FOCUSABLE | BitmapField.FIELD_HCENTER | BitmapField.FIELD_VCENTER | BitmapField.USE_ALL_WIDTH) {
            protected boolean navigationClick(int status, int time) {
                fieldChangeNotify(0);
                displayFilterOptions();
                return super.navigationClick(status, time);    // handle click event
            }
        };

Please use plain text.
Developer
arkadyz
Posts: 2,268
Registered: ‎07-08-2009
My Device: various
My Carrier: various

Re: Handling navigationClick for a BitmapField

Simply return true instead of super.navigationClick (which is what's propagating the click to the rest of fields and managers).

----------------------------------------------------------
please click 'Accept Solution' on posts that provide the solution to the question you've posted. Don't say "Thanks", press 'Like' button instead!
Please use plain text.