Пример #1
0
 public RecyclerViewContainer(Context context, ShellFlyoutRecyclerAdapter shellFlyoutRecyclerAdapter) : base(context)
 {
     _shellFlyoutRecyclerAdapter = shellFlyoutRecyclerAdapter;
     SetClipToPadding(false);
     SetLayoutManager(_layoutManager = new ScrollLayoutManager(context, (int)Orientation.Vertical, false));
     SetLayoutManager(new LinearLayoutManager(context, (int)Orientation.Vertical, false));
     SetAdapter(_shellFlyoutRecyclerAdapter);
 }
Пример #2
0
        protected override void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }

            _disposed = true;
            if (disposing)
            {
                SetLayoutManager(null);
                SetAdapter(null);
                _shellFlyoutRecyclerAdapter?.Dispose();
                _layoutManager?.Dispose();
                _shellFlyoutRecyclerAdapter = null;
                _layoutManager = null;
            }

            base.Dispose(disposing);
        }