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
Posts: 25
Registered: ‎07-02-2008
My Device: Not Specified

Enable Multitap by default?

Hi,

Is there a way to enable Multitap (instead of predictive text) by default when using BasicEditField or any other BlackBerry UI's editable fields? Right now, I have to click on menu key and select enable multitap.

Thank you.

BlackBerry Development Advisor
Posts: 15,806
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Enable Multitap by default?

No, it is currently not possible to do this programmatically.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
New Developer
Posts: 2
Registered: ‎12-08-2008
My Device: Not Specified

Re: Enable Multitap by default?

Well, considereing the phone will NOT stay set to multitap after hundreds of times setting that as the default is annoying to the extreme.  Not a problem usually, but I don't want to use suretype when searching for acontact when in the dial pad mode.  I hope rim fixes this soon or my storm will soon be headed back to the supplier!
Developer
Posts: 17,017
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Enable Multitap by default?

implement a focuschangedlistener, add it to the editfield you want multitap to be enabled with.
please note that you will always have multitap enabled in this field when you focus it (which was my goal).
call this method:

private void ensureMultitap() {
Menu menu = getScreen().getMenu(0);
menu.add(getFieldWithFocus().getContextMenu());
int size = menu.getSize();
boolean localeChanged = false;
Locale oldLocale = Locale.getDefaultForSystem();
if (!oldLocale.getLanguage().equalsIgnoreCase("en")) {
localeChanged = true;
Locale.setDefault(Locale.get("en"));
}
for (int i = 0; i size; i++) {
MenuItem item = menu.getItem(i);
if ("Enable Multitap".equals(item.toString())) {
item.run();
}
}
if (localeChanged) {
// return the original locale
Locale.setDefault(oldLocale);
}
}
----------------------------------------------------------
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
Highlighted
New Developer
Posts: 8
Registered: ‎06-05-2009
My Device: Not Specified

Re: Enable Multitap by default?