Merge "(1-pane) Do smooth transition when switching between tabs"
diff --git a/src/com/android/contacts/activities/PeopleActivity.java b/src/com/android/contacts/activities/PeopleActivity.java
index 7040bdc..07fa8f1 100644
--- a/src/com/android/contacts/activities/PeopleActivity.java
+++ b/src/com/android/contacts/activities/PeopleActivity.java
@@ -582,10 +582,12 @@
if (mActionBarAdapter.isSearchMode()) {
mTabPagerAdapter.setSearchMode(true);
} else {
+ // No smooth scrolling if quitting from the search mode.
+ final boolean wasSearchMode = mTabPagerAdapter.isSearchMode();
mTabPagerAdapter.setSearchMode(false);
int tabIndex = tab.ordinal();
if (mTabPager.getCurrentItem() != tabIndex) {
- mTabPager.setCurrentItem(tab.ordinal(), false /* no smooth scroll */);
+ mTabPager.setCurrentItem(tabIndex, !wasSearchMode);
}
}
invalidateOptionsMenu();