Run the example app with Expo to see it in action.
#Android material design animation android#
Works on both iOS and Android following platform adaptation guidelinesĬurrently supported React Native version: >= 0.50.3 Try it out.Remove all previously added AppBarLayout.LiftOnScrollListeners. PRESSED_SELECTED_WINDOW_FOCUSED_STATE_SETĪppBarLayout(Context context, AttributeSet attrs)ĪppBarLayout(Context context, AttributeSet attrs, int defStyleAttr)ĪddLiftOnScrollListener( AppBarLayout.LiftOnScrollListener liftOnScrollListener)Īdd a AppBarLayout.LiftOnScrollListener that will be called when the lift on scroll elevation andīackground color of this AppBarLayout change.ĪddOnOffsetChangedListener( AppBarLayout.OnOffsetChangedListener listener)ĪddOnOffsetChangedListener( BaseOnOffsetChangedListener listener)Īdd a listener that will be called when the offset of this AppBarLayout changes. PRESSED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET PRESSED_ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET PRESSED_ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET PRESSED_ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET PRESSED_ENABLED_FOCUSED_SELECTED_STATE_SET IMPORTANT_FOR_CONTENT_CAPTURE_NO_EXCLUDE_DESCENDANTS IMPORTANT_FOR_AUTOFILL_YES_EXCLUDE_DESCENDANTS
IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS Scrolling to automatically scroll any AppBarLayout siblings.ĪUTOFILL_FLAG_INCLUDE_NOT_IMPORTANT_VIEWSĪUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATEĪUTOFILL_HINT_CREDIT_CARD_EXPIRATION_MONTHĪUTOFILL_HINT_CREDIT_CARD_EXPIRATION_YEARĭRAG_FLAG_GLOBAL_PERSISTABLE_URI_PERMISSION Interface definition for a callback to be invoked when an AppBarLayout's verticalĪn effect class that should be implemented and used by AppBarLayout children to be givenĮffects when the AppBarLayout's offset changes.Ī class which handles updating an AppBarLayout child, if marked with the app:layout_scrollEffect compress, at each step in the AppBarLayout's offsetĪ ViewGroup.LayoutParams implementation for AppBarLayout.ĭefinition for a callback to be invoked when the lift on scroll elevation and background colorīehavior which should be used by Views which can scroll vertically and support nested
The default AppBarLayout.Behavior for AppBarLayout.
#Android material design animation full#
Resource containing the full class name is available. Set your scrolling view's behavior to be an instance of AppBarLayout.ScrollingViewBehavior. Theīinding is done through the AppBarLayout.ScrollingViewBehavior behavior class, meaning that you should
If you use AppBarLayout within a different ViewGroup, most of its functionality will notĪppBarLayout also requires a separate scrolling sibling in order to know when to scroll. This view depends heavily on being used as a direct child within a CoordinatorLayout. appbar.AppBarLayoutĪppBarLayout is a vertical LinearLayout which implements many of the features of materialĭesigns app bar concept, namely scrolling gestures.Ĭhildren should provide their desired scrolling behavior through (int) and the associated layout xml attribute: app:layout_scrollFlags.