2

I have multiple keyboards on my device, how can I switch between the different keyboards programmatically?

(I don't want to simply open or close the soft keyboard as in: android - show soft keyboard on demand. I need to switch to the default keyboard.)

Edit: add code

If i try below code, i switch to current keyboard:

    InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
    imm.toggleSoftInput( 0, 0);

But i need switch to default keyboard.

Please get me any idea to switch to default keyboard?

Community
  • 1
  • 1
Tapa Save
  • 4,769
  • 5
  • 32
  • 54
  • no, i need not hide keyboard! i need switch current softkeyboard (keyboard may be now opened or closed) to default (!). – Tapa Save Dec 03 '12 at 06:37
  • "In system may be 2-3 [or more] keyboards ... How i can switch to default 3-keyboard?" I see, please [edit] the question to describe _exactly_ what you want to do in more detail, preferably with the code that you are working with, see [ask] for tips. And the community can vote to open this question again. – Sam Dec 03 '12 at 06:47
  • I think this question is not duplicate! please read thoughtfully my post. In system may be some keyboards, for example 5. Current open number 4. Default is number 3. i need switch to DEFAULT (!!!!!!) 3-keyboard without open or close them. i don't need switch to current 4-keyboard, i don't need open any keyboard, i don't need close any keyboard, i need switch to default keyboard! – Tapa Save Dec 03 '12 at 07:00
  • I changed your question a little to remove some confusion. But you still need to click on "[edit]" to add: more information, code samples, and possibly a screenshot to improve this question as discussed in [ask]. – Sam Dec 03 '12 at 07:16
  • Sam, thank you for help. I add any details above. – Tapa Save Dec 03 '12 at 07:26

1 Answers1

0

If you want to display the keyboard on edittext by default, here is how you can:

 yourEditText.requestFocus();
Avadhani Y
  • 7,566
  • 19
  • 63
  • 90
  • Avadhani, thanks! But this is not need display, only switch to default. In system may be 2-3-... keyboards, now may be current is 2. But default is 3. How i can switch to default 3-keyboard? – Tapa Save Dec 03 '12 at 06:40