Example #1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            try
            {
                base.OnCreate(savedInstanceState);
                SetTheme(AppSettings.SetTabDarkTheme ? Resource.Style.MyTheme_Dark_Base : Resource.Style.MyTheme_Base);

                Methods.App.FullScreenApp(this);

                // Create your application here
                SetContentView(Resource.Layout.RecyclerDefaultLayout);

                Instance = this;

                //Get Value And Set Toolbar
                InitComponent();
                InitToolbar();
                SetRecyclerViewAdapters();

                LoadArticles();
            }
            catch (Exception e)
            {
                Methods.DisplayReportResultTrack(e);
            }
        }
            public override bool ShouldOverrideUrlLoading(WebView view, IWebResourceRequest request)
            {
                try
                {
                    if (request.Url.ToString() == MActivity.Url)
                    {
                        view.LoadUrl(request.Url.ToString());
                    }
                    else if (request.Url.ToString().Contains("read-blog"))
                    {
                        var con = ArticlesActivity.GetInstance();
                        if (con != null)
                        {
                            con.SwipeRefreshLayout.Refreshing = true;

                            con.MAdapter.ArticlesList.Clear();
                            con.MAdapter.NotifyDataSetChanged();

                            con.MainScrollEvent.IsLoading = false;

                            con.StartApiService();
                        }
                        MActivity.Finish();
                    }
                }
                catch (Exception e)
                {
                    Console.WriteLine(e);
                }
                return(false);
            }
Example #3
0
        private void DestroyBasic()
        {
            try
            {
                MAdView?.Destroy();

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