To Show (or) Hide the Keyboard When User Launches the Activity

If you are developing an Android Application which make use of EditText view, which every developer make use of one way (or) other, here is tip to load the keyboard as soon as you enter the activity (or) disable and show only when user places the cursor on the EditText


TIP 4:

           To show the keyboard as soon as the user launches the activity (or) enters the screen which contains EditText fields, Add the below line of code to AndroidManifest.xml file inside the tag :


android:windowSoftInputMode="adjustResize|stateHidden"


            To disable the keyboard and show only when user places the cursor use the below line of code:


android:windowSoftInputMode="adjustResize|stateVisible"


Comments

Popular posts from this blog

Google India Introduces the people card on Google Search for Mobile Devices with ' Add me to search'.

How to Install Node js on Ubuntu