summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorNancy Chen <nancychen@google.com>2015-09-11 00:47:31 -0400
committerNancy Chen <nancychen@google.com>2015-09-11 00:54:47 -0400
commitf3d9f829cef463eb328285ed478a9323e2c085e6 (patch)
tree61b5e4edf2f9100f47d41010562f3911c436ac78 /res
parent27031077952a07e9203c3f4594ae6ae6ec7ba108 (diff)
Translate FAB up and down when Snackbar appears and disappears.
This is implements custom behavior according the Material Design spec that the Snackbar cannot obscure the FAB. Converts the dialtacts activity layout to a CoordinatorLayout and attaches the FloatingActionButtonBehavior to the FAB. Bug: 23687913 Change-Id: Ic4d0493db415bb97cf7e21de4f23a02df9f753b1
Diffstat (limited to 'res')
-rw-r--r--res/layout/dialtacts_activity.xml8
1 files changed, 5 insertions, 3 deletions
diff --git a/res/layout/dialtacts_activity.xml b/res/layout/dialtacts_activity.xml
index 0f1f2bbdb..782d4f310 100644
--- a/res/layout/dialtacts_activity.xml
+++ b/res/layout/dialtacts_activity.xml
@@ -13,8 +13,9 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<FrameLayout
+<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/dialtacts_mainlayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
@@ -43,7 +44,8 @@
android:layout_width="@dimen/floating_action_button_width"
android:layout_height="@dimen/floating_action_button_height"
android:layout_marginBottom="@dimen/floating_action_button_margin_bottom"
- android:layout_gravity="center_horizontal|bottom">
+ android:layout_gravity="center_horizontal|bottom"
+ app:layout_behavior="com.android.dialer.FloatingActionButtonBehavior">
<ImageButton
android:id="@+id/floating_action_button"
@@ -68,4 +70,4 @@
android:importantForAccessibility="no" />
</FrameLayout>
-</FrameLayout>
+</android.support.design.widget.CoordinatorLayout>