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
Developer
MFSI
Posts: 80
Registered: ‎09-03-2012
My Device: 9810
Accepted Solution

FieldChangeListener on a ButtonField is showing a Prompt Dialog with options named Switch Application and Full Menu. instead of defined action.

Hi I am using a ButtonField in my screen class and added ChangeListener to it and provided required action in

 

fieldChanged(Field field, int context)

 method. But whenever I click on a button a Dialog prompts reading two options as Switch Application and Full Menu.


I think there is some method that needs to be overridden to avoid this. I am getting this result when I am running my app in device with OS 5.0 but it works fine on Simulator (7.0).

Always Success
Developer
MFSI
Posts: 80
Registered: ‎09-03-2012
My Device: 9810

Re: FieldChangeListener on a ButtonField is showing a Prompt Dialog with options named Switch Application and Full Menu. instead of defined action.

[ Edited ]

Well i think the problem still persists:

I have overrridden the following method

protected boolean navigationClick(int status, int time) {
		return true;
	}

 where navigation click event is consumed. Well by doing this now prompt is not appearing.

But now control not entering

 

fieldChanged(Field field, int context)

 So action on click is not performed. This is happening in Curve 8900 (5.0).

 

Always Success
Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: FieldChangeListener on a ButtonField is showing a Prompt Dialog with options named Switch Application and Full Menu. instead of defined action.

use ButtonField.CONSUME_CLICK as a style.

your navigationclick override would also work, but you would have to trigger the field changed event yourself before returning true.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter