summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSai Cheemalapati <saicheems@google.com>2014-06-13 10:22:26 -0700
committerSai Cheemalapati <saicheems@google.com>2014-06-13 10:53:18 -0700
commit00a3d5d576d53b43a46849bf40c43bccde44a9b2 (patch)
tree5a3916a9fcb663a45146b4f54e99e37dd736a4dd
parent3307fdc5e84e456370e7630e4fe0300aba59cd26 (diff)
Fixes issue with FAB alginment.
FAB now aligns correctly when selecting tabs. Change-Id: I94aefb9194a60c47504f238eedbebd466f9bd52d
-rw-r--r--src/com/android/dialer/DialtactsActivity.java8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java
index a9eb21779..19af4ef91 100644
--- a/src/com/android/dialer/DialtactsActivity.java
+++ b/src/com/android/dialer/DialtactsActivity.java
@@ -1137,18 +1137,14 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O
// tab.
if (position == ListsFragment.TAB_INDEX_SPEED_DIAL && !mIsLandscape) {
mFloatingActionButtonController.onPageScrolled(positionOffset);
+ } else if (position != ListsFragment.TAB_INDEX_SPEED_DIAL) {
+ mFloatingActionButtonController.onPageScrolled(1);
}
}
@Override
public void onPageSelected(int position) {
mCurrentTabPosition = position;
- // Prevents jittery movement when clicking on tabs.
- if (mCurrentTabPosition != ListsFragment.TAB_INDEX_SPEED_DIAL) {
- mFloatingActionButtonController.manuallyTranslate(
- mFloatingActionButtonController.getTranslationXForAlignment(
- FloatingActionButtonController.ALIGN_RIGHT), 0);
- }
}
@Override