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

How To Record Audio in Moto G Without Any Third Party Apps

How to Unistall Software (or) Programs in Ubuntu Using the Terminal

All the Questions Answered About Rs.500 and Rs.1000 In this Frequently Asked Question Document