Esempio n. 1
0
 public void initializeSlidingPanelDelegates(SlidingUpPanelLayout view, NavigationLayoutManager manager)
 {
     //Binds a delegate that enables recyclerView scrolling iff the panel has been expanded, otherwise it disables it; it runs every time the panel state changes.
     //Also enables map scrolling iff the panel has been collapsed, otherwise disables it.
     view.PanelStateChanged += delegate
     {
         manager.scrollable = (view.GetPanelState() == SlidingUpPanelLayout.PanelState.Expanded);
         map.UiSettings.ScrollGesturesEnabled = (view.GetPanelState() == SlidingUpPanelLayout.PanelState.Collapsed);
     };
 }
Esempio n. 2
0
        private NavigationLayoutManager initializeSlidingPanel()
        {
            //Binds a variable for the recycler view, layout manager, and slideUp panel
            var recyclerView  = FindViewById <RecyclerView>(Resource.Id.slidingRecycler);
            var layoutManager = new NavigationLayoutManager(this);
            var slideUpLayout = FindViewById <SlidingUpPanelLayout>(Resource.Id.sliding_layout);

            //Sets the layout manager to not allow scrolling so it doesn't interfere with pulling up the sliding layout
            layoutManager.scrollable = false;

            //Creates a blank new adapter
            var adapter = new RouteSummaryRowAdapter();

            //Sets the layout manager and adapter for the recyclerView
            recyclerView.SetLayoutManager(layoutManager);
            recyclerView.SetAdapter(adapter);

            //Returns the layoutManager produced (not really used)
            return(layoutManager);
        }