Bug 808408 - Hide keyboard when switching awesome tabs. r=bnicholson

This commit is contained in:
Wes Johnston 2012-12-11 15:52:36 -08:00
parent 62f5fae95d
commit a98d155a0f

View File

@ -128,7 +128,7 @@ public class AwesomeBarTabs extends TabHost {
mListTouchListener = new View.OnTouchListener() {
public boolean onTouch(View view, MotionEvent event) {
if (event.getAction() == MotionEvent.ACTION_DOWN)
if (event.getActionMasked() == MotionEvent.ACTION_DOWN)
hideSoftInput(view);
return false;
}
@ -156,10 +156,12 @@ public class AwesomeBarTabs extends TabHost {
public void onPageSelected(int position) {
tabWidget.setCurrentTab(position);
styleSelectedTab();
hideSoftInput(mViewPager);
}
});
for (int i = 0; i < mTabs.length; i++) {
mTabs[i].setListTouchListener(mListTouchListener);
addAwesomeTab(mTabs[i].getTag(),
mTabs[i].getTitleStringId(),
i);