private void DestroyBasic()
 {
     try
     {
         MAdapter                       = null !;
         RandomAdapter                  = null !;
         CategoriesAdapter              = null !;
         SwipeRefreshLayout             = null !;
         EmptyStateLayout               = null !;
         SuggestedGroupViewStub         = null !;
         CatGroupViewStub               = null !;
         RandomGroupViewStub            = null !;
         Inflated                       = null !;
         SuggestedGroupInflated         = null !;
         CatGroupInflated               = null !;
         RandomGroupInflated            = null !;
         RecyclerInflaterSuggestedGroup = null !;
         RecyclerInflaterCatGroup       = null !;
         RecyclerInflaterRandomGroup    = null !;
         SuggestedGroupScrollEvent      = null !;
     }
     catch (Exception e)
     {
         Methods.DisplayReportResultTrack(e);
     }
 }
        private void SetRecyclerViewAdapters()
        {
            try
            {
                MAdapter = new SearchGroupAdapter(Activity)
                {
                    GroupList = new ObservableCollection <GroupClass>()
                };
                MAdapter.ItemClick           += MAdapterOnItemClick;
                MAdapter.JoinButtonItemClick += MAdapterOnJoinButtonItemClick;
                LayoutManager = new LinearLayoutManager(Activity);
                MRecycler.SetLayoutManager(LayoutManager);
                MRecycler.HasFixedSize = true;
                MRecycler.SetItemViewCacheSize(10);
                MRecycler.GetLayoutManager().ItemPrefetchEnabled = true;
                var sizeProvider = new FixedPreloadSizeProvider(10, 10);
                var preLoader    = new RecyclerViewPreloader <GroupClass>(Activity, MAdapter, sizeProvider, 10);
                MRecycler.AddOnScrollListener(preLoader);
                MRecycler.SetAdapter(MAdapter);

                RecyclerViewOnScrollListener xamarinRecyclerViewOnScrollListener = new RecyclerViewOnScrollListener(LayoutManager);
                MainScrollEvent = xamarinRecyclerViewOnScrollListener;
                MainScrollEvent.LoadMoreEvent += MainScrollEventOnLoadMoreEvent;
                MRecycler.AddOnScrollListener(xamarinRecyclerViewOnScrollListener);
                MainScrollEvent.IsLoading = false;
            }
            catch (Exception e)
            {
                Methods.DisplayReportResultTrack(e);
            }
        }
예제 #3
0
 private void DestroyBasic()
 {
     try
     {
         MAdapter                       = null;
         RandomAdapter                  = null;
         CategoriesAdapter              = null;
         SwipeRefreshLayout             = null;
         EmptyStateLayout               = null;
         SuggestedGroupViewStub         = null;
         CatGroupViewStub               = null;
         RandomGroupViewStub            = null;
         Inflated                       = null;
         SuggestedGroupInflated         = null;
         CatGroupInflated               = null;
         RandomGroupInflated            = null;
         RecyclerInflaterSuggestedGroup = null;
         RecyclerInflaterCatGroup       = null;
         RecyclerInflaterRandomGroup    = null;
         SuggestedGroupScrollEvent      = null;
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
     }
 }
        private void SetRecyclerViewAdapters()
        {
            try
            {
                LayoutManager = new LinearLayoutManager(this);
                MAdapter      = new SearchGroupAdapter(this)
                {
                    GroupList = new ObservableCollection <GroupClass>()
                };

                MRecycler.SetLayoutManager(LayoutManager);
                MRecycler.HasFixedSize = true;
                MRecycler.SetItemViewCacheSize(10);
                MRecycler.GetLayoutManager().ItemPrefetchEnabled = true;
                MRecycler.SetAdapter(MAdapter);

                RecyclerViewOnScrollListener xamarinRecyclerViewOnScrollListener = new RecyclerViewOnScrollListener(LayoutManager);
                MainScrollEvent = xamarinRecyclerViewOnScrollListener;
                MainScrollEvent.LoadMoreEvent += MainScrollEventOnLoadMoreEvent;
                MRecycler.AddOnScrollListener(xamarinRecyclerViewOnScrollListener);
                MainScrollEvent.IsLoading = false;
            }
            catch (Exception e)
            {
                Methods.DisplayReportResultTrack(e);
            }
        }
        private void SetRecyclerViewAdapters()
        {
            try
            {
                MAdapter = new SuggestedGroupAdapter(this)
                {
                    GroupList = new ObservableCollection <GroupClass>()
                };
                MAdapter.ItemClick           += MAdapterOnItemClick;
                MAdapter.JoinButtonItemClick += MAdapterOnJoinButtonItemClick;

                RandomAdapter = new SearchGroupAdapter(this)
                {
                    GroupList = new ObservableCollection <GroupClass>()
                };
                RandomAdapter.ItemClick           += RandomAdapterOnItemClick;
                RandomAdapter.JoinButtonItemClick += MAdapterOnJoinButtonItemClick;

                if (CategoriesController.ListCategoriesGroup.Count > 0)
                {
                    CategoriesAdapter = new CategoriesImageAdapter(this)
                    {
                        CategoriesList = CategoriesController.ListCategoriesGroup
                    };
                    CategoriesAdapter.ItemClick += CategoriesAdapterOnItemClick;

                    if (CatGroupInflated == null)
                    {
                        CatGroupInflated = CatGroupViewStub.Inflate();
                    }

                    RecyclerInflaterCatGroup = new TemplateRecyclerInflater();
                    RecyclerInflaterCatGroup.InflateLayout <Classes.Categories>(this, CatGroupInflated, CategoriesAdapter, TemplateRecyclerInflater.TypeLayoutManager.LinearLayoutManagerHorizontal, 0, true, GetString(Resource.String.Lbl_Categories), GetString(Resource.String.Lbl_FindGroupByCategories));

                    RecyclerInflaterCatGroup.Recyler.Visibility = ViewStates.Visible;

                    CategoriesAdapter.NotifyDataSetChanged();
                }
                else
                {
                    Methods.DisplayReportResult(this, "Not have List Categories Group");
                }
            }
            catch (Exception e)
            {
                Methods.DisplayReportResultTrack(e);
            }
        }
예제 #6
0
        private void DestroyBasic()
        {
            try
            {
                MAdView?.Destroy();

                MAdapter           = null;
                SwipeRefreshLayout = null;
                MRecycler          = null;
                EmptyStateLayout   = null;
                Inflated           = null;
                MAdView            = null;
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
예제 #7
0
        private void DestroyBasic()
        {
            try
            {
                MAdView?.Destroy();

                MAdapter           = null !;
                SwipeRefreshLayout = null !;
                MRecycler          = null !;
                EmptyStateLayout   = null !;
                Inflated           = null !;
                MAdView            = null !;
            }
            catch (Exception e)
            {
                Methods.DisplayReportResultTrack(e);
            }
        }