Bug 763396 - Dismiss keyboard when showing tabs tray. r=mfinkle

This commit is contained in:
Brian Nicholson 2012-06-21 11:44:35 -07:00
parent d3b1c03e32
commit b52d7a601a

View File

@ -24,6 +24,7 @@ import android.util.AttributeSet;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.animation.TranslateAnimation;
import android.view.inputmethod.InputMethodManager;
import android.view.ContextMenu;
import android.view.Gravity;
import android.view.LayoutInflater;
@ -327,10 +328,15 @@ public class BrowserToolbar implements ViewSwitcher.ViewFactory,
}
private void toggleTabs() {
if (GeckoApp.mAppContext.areTabsShown())
if (GeckoApp.mAppContext.areTabsShown()) {
GeckoApp.mAppContext.hideTabs();
else
} else {
// hide the virtual keyboard
InputMethodManager imm =
(InputMethodManager) mContext.getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(mTabs.getWindowToken(), 0);
GeckoApp.mAppContext.showLocalTabs();
}
}
public void updateTabCountAndAnimate(int count) {