I have four tabs in my home screen and one of them takes user input.On entering data in the input tab the keyboard opens up.This keyboard remains open when i switch to other tab.Any suggestions about what i need to do ?
            Asked
            
        
        
            Active
            
        
            Viewed 1,340 times
        
    1
            
            
        - 
                    http://stackoverflow.com/questions/10297376/how-do-i-hide-the-soft-keyboard-when-changing-tabs – Kunal Khaire Apr 09 '13 at 10:19
- 
                    [See this - ][1]http://stackoverflow.com/questions/1109022/close-hide-the-android-soft-keyboard?rq=1 [1]: http://stackoverflow.com/questions/1109022/close-hide-the-android-soft-keyboard?rq=1 – Neo Apr 09 '13 at 10:20
2 Answers
1
            
            
        The following code is copied from Close/hide the Android Soft Keyboard.
Next time, please, search the forum before posting a question:
tabHost.setOnTabChangedListener(new OnTabChangeListener()
        {
        public void onTabChanged(String tabId)
            {
            InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
            imm.hideSoftInputFromWindow(tabHost.getApplicationWindowToken(), 0);
            }
        }
- 
                    got it ! infact i posted the link that i got my answer from.Should i delete the question now ? – Kunal Khaire Apr 09 '13 at 10:37
0
            
            
        this may helps you , in your Manifest with Activity declaire like this
<activity android:windowSoftInputMode="adjustResize" />
or
<activity android:windowSoftInputMode="adjustPan" /> for more info 
or
<activity
        android:name=".Home"
        android:configChanges="keyboardHidden|orientation">
    </activity>
 
    
    
        Ankitkumar Makwana
        
- 3,475
- 3
- 19
- 45
- 
                    Tried,this but dint worked for me. http://stackoverflow.com/questions/10297376/how-do-i-hide-the-soft-keyboard-when-changing-tabs this is what worked for me. Thanks for your time. – Kunal Khaire Apr 09 '13 at 10:45
 
     
    