Board logo

subject: How to Show / Hide Soft Keyboard software[DEV Tips Tools] [print this page]


I had to fix it today so I thought that I would be joint with the world. Say, for any reason you need to show or hide the virtual(soft) keyboard in Android App. It is not very intuitive, but you can easily do that. Heres one scenario youre the place of performance measures that focus in the text box. To my surprise, did not bring myTouch on the keyboard(or emulator). In fact, it requires the following additional codes:

To view:

[java]

editText EditText =(EditText) findViewById(R.id.myEdit)

MA InputMethodManager =(InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE)

// will do this only if no physical keyboard is open

mgr.showSoftInput(editText, InputMethodManager.SHOW_IMPLICIT)

[/ Java]

A to hide:

[java]

MA InputMethodManager =(InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE)

mgr.hideSoftInputFromWindow(editText.getWindowToken(), 0);

[/ Java]

Via: Android Mobile Reviews

Description of Source:

Android mobile reviews to compare the latest phones. Provide news on new phone releases and any knowledge about Google Android.

Related Posting Search Result:Changes in the settlement agreement Android Developer

Update: kindly author who remembers the details of the previous version of the agreement has improved us a...Storage Developer Center

Google is announcement new Labs service called Google Luggage for developers cloud , which provides storage o...Adding support for CVS to MOTODEV Studio[Tips & Tools]

MOTODEV Studio Android is a great piece of machinery. Unfortunately, since version 1.0.1, it comes with some ba...Easy Root removed from the Android Market, now available in the App Developers Site

developer Easy Root application, which allowed Motorola owners Droid, Droid X and Motorola Milestone(Your phon...Why Android Developers Need Business Model

(cross-posted with CommonsBlog ) Android developers quickly jump on the Android Market failures in many co...Nexus One available directly from Google Again as a developer phone

Any developers out there who get a chance to free carrier Nexus One directly from Google given another chance. As ...

How to Show / Hide Soft Keyboard software[DEV Tips Tools]

By: blue48




welcome to loan (http://www.yloan.com/) Powered by Discuz! 5.5.0