diff options
author | Yorke Lee <yorkelee@google.com> | 2014-04-24 11:22:57 -0700 |
---|---|---|
committer | Yorke Lee <yorkelee@google.com> | 2014-04-25 10:45:41 -0700 |
commit | cc4660d463daa11b969fd9b8bdd308ae3416c67a (patch) | |
tree | 4d9af81120ea0ab469b47b9914d5682c4ac75c2e /res | |
parent | e33cf96b4be14f64935b91e6a21ec1c8ab676acf (diff) |
Animate floating action button
DialtactsActivity now implements ViewPager.OnPageChangeListener,
so that it can animate the floating action button in response
to page changed events in ListsFragments. Because ViewPagerTabs
also needs to listen to page changed events and ViewPager only
supports one OnPageChangeListener, ListsFragments is now in charge
of listening to page changed events from ViewPager and firing off
the same events to multiple OnpageChangedListeners
Bug: 14281810
Change-Id: Ic9b7ca8669d3a9cc0a997a84afe6788d6fd51bb9
Diffstat (limited to 'res')
-rw-r--r-- | res/layout/dialtacts_activity.xml | 2 | ||||
-rw-r--r-- | res/values/dimens.xml | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/res/layout/dialtacts_activity.xml b/res/layout/dialtacts_activity.xml index 50049afa0..172b110de 100644 --- a/res/layout/dialtacts_activity.xml +++ b/res/layout/dialtacts_activity.xml @@ -22,6 +22,7 @@ android:focusable="true" android:focusableInTouchMode="true" android:clipChildren="false" + android:animateLayoutChanges="true" android:background="@color/background_dialer_light" > <RelativeLayout @@ -119,6 +120,7 @@ <FrameLayout android:layout_height="@dimen/floating_action_button_height" android:layout_width="@dimen/floating_action_button_width" + android:layout_marginRight="@dimen/floating_action_button_margin_right" android:layout_marginBottom="@dimen/floating_action_button_margin_bottom" android:id="@+id/floating_action_button" android:background="@color/actionbar_background_color" diff --git a/res/values/dimens.xml b/res/values/dimens.xml index 2fe7677e5..66b36a773 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -65,6 +65,8 @@ <!-- Match call_button_height to Phone's dimens/in_call_end_button_height --> <dimen name="call_button_height">74dp</dimen> + <!-- Right margin of the floating action button --> + <dimen name="floating_action_button_margin_right">10dp</dimen> <!-- Bottom margin of the floating action button --> <dimen name="floating_action_button_margin_bottom">10dp</dimen> |