Exemplo n.º 1
0
        public static void AttachMaterialScrollBehaviour(this View scrollView, AppBarLayout appBarLayout)
        {
            if (MarshmallowApis.AreNotAvailable)
            {
                return;
            }

            scrollView.SetOnScrollChangeListener(new MaterialScrollBehaviorListener(appBarLayout));

            if (scrollView is NestedScrollView)
            {
                appBarLayout.Post(() => appBarLayout.Elevation = 0);
            }
        }