Reputation: 2325
Hey I am facing this very unusual issue and dont find any cause for this problem:
I have an Activity A which has a viewpager with only two fragments. [both the fragment have only three elements in their layout 1) ListView 2) EditText and 3) Button next to the editText]
The issue is when ever i call an startActivityForResult from this Activity A to any other activity, [suppose Activity B in this case]
When i return to Activity A from any Activity B the KeyBoard slides UP.
The edittext does not have the focus [I am sure about that]. I really don't know why this keyboard shows up.
If anyone had a similar kind of issue then please help. Or suggest me where should i dig to get the cause of this problem.
Please Help.
Thanks in advance!
Upvotes: 0
Views: 35
Reputation: 1020
Option 1: If you go to your manifest file and do the below changes, it'll only effect your current application
android:configChanges="keyboardHidden|orientation"
Or
android:windowSoftInputMode="stateHidden"
Option 2: If you want your emulator's soft-keyboard to disable independent of your application, you follow this:
Go to the settings within the emulator: settings -> language and keyboard and uncheck "Android keyboard" and the other odd ones if they are checked too
And whenever you want to use it back, just check it back...you are done.
Upvotes: 1
Reputation: 47817
Set this to your Activity
in manifest.xml
android:configChanges="keyboardHidden|orientation"
Or
android:windowSoftInputMode="stateHidden"
Upvotes: 2