Reputation: 21
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 ?
Upvotes: 1
Views: 1348
Reputation: 3485
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>
Upvotes: 0
Reputation: 3964
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);
}
}
Upvotes: 1