MvvmCross / MvvmCross-AndroidSupport

Android support library packages for MvvmCross: The .NET MVVM framework for cross-platform solutions.
http://mvvmcross.com
15 stars 0 forks source link

Implemented FAB auto-scroll-hide behaviors #195

Closed thefex closed 8 years ago

thefex commented 8 years ago

Usage:

  <android.support.design.widget.FloatingActionButton
    android:id="@+id/autoScrollFab"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:src="@drawable/ic_check_white_24dp"
    android:layout_margin="16dp"
    android:layout_gravity="bottom|right"
    local:elevation="4dp"
    local:backgroundTint="@color/colorPrimary"
    local:rippleColor="@color/colorPrimaryDark" 
   ** local:layout_behavior="@string/fab_scroll_translation_autohide_behavior" />**

For translation animation (bottom corner FAB case)

  <android.support.design.widget.FloatingActionButton
    android:id="@+id/autoScrollFab"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:src="@drawable/ic_check_white_24dp"
    android:layout_margin="16dp"
    android:layout_gravity="bottom|right"
    local:elevation="4dp"
    local:backgroundTint="@color/colorPrimary"
    local:rippleColor="@color/colorPrimaryDark" 
   ** local:layout_behavior="@string/fab_scroll_shrink_grow_autohide_behavior" />**

for shrink-grow animation (appbar fab case)

martijn00 commented 8 years ago

Thanks!