commit | e8893b91156ee4933c403e59b085a79cc36d3159 | [log] [tgz] |
---|---|---|
author | Maurice Chu <mochu@google.com> | Tue May 15 17:09:41 2012 -0700 |
committer | Android (Google) Code Review <android-gerrit@google.com> | Tue May 15 17:09:41 2012 -0700 |
tree | 0a4c9783dd53ab749bb225764c86049f1fa6311d | |
parent | b4a0b320c9e3e617ee1dea8f210af8ac027f6795 [diff] | |
parent | 0b398b3d178d1fe8fd3ebfb9396e36d1228b53c6 [diff] |
Merge "Fragment carousel always starts on About page" into jb-dev
diff --git a/src/com/android/contacts/detail/ContactDetailFragmentCarousel.java b/src/com/android/contacts/detail/ContactDetailFragmentCarousel.java index 7af9b28..08ed87b 100644 --- a/src/com/android/contacts/detail/ContactDetailFragmentCarousel.java +++ b/src/com/android/contacts/detail/ContactDetailFragmentCarousel.java
@@ -173,6 +173,16 @@ } } + /** + * Reset the fragment carousel to show the about page. + */ + public void reset() { + if (mCurrentPage != ABOUT_PAGE) { + mCurrentPage = ABOUT_PAGE; + snapToEdge(); + } + } + public int getCurrentPage() { return mCurrentPage; }
diff --git a/src/com/android/contacts/detail/ContactDetailLayoutController.java b/src/com/android/contacts/detail/ContactDetailLayoutController.java index e6a5984..2c18d4f 100644 --- a/src/com/android/contacts/detail/ContactDetailLayoutController.java +++ b/src/com/android/contacts/detail/ContactDetailLayoutController.java
@@ -405,6 +405,9 @@ case LayoutMode.TWO_COLUMN_FRAGMENT_CAROUSEL: { // Allow swiping between all fragments mFragmentCarousel.enableSwipe(true); + if (isDifferentContact) { + mFragmentCarousel.reset(); + } if (!isDifferentContact && animateStateChange) { mFragmentCarousel.animateAppear(); }