示例#1
0
        private void VisitsButtonOnClick(object sender, EventArgs e)
        {
            try
            {
                MAdapter.NotificationsList.Clear();

                MAdapter.NotificationsList = ListUtils.VisitsList;
                MAdapter.NotifyDataSetChanged();

                ToolbarView.SetBackgroundResource(Resource.Drawable.Shape_Gradient_Normal);
                VisitsImage.SetColorFilter(Color.ParseColor("#ffffff"));
                VisitsTextView.SetTextColor(Color.ParseColor(AppSettings.MainColor));
                VisitsLayout.SetBackgroundResource(Resource.Drawable.Shape_Radius_Gradient_Btn);
                VisitsButton.Tag = "Clicked";

                ResetTabsButtonOnVistsClick();

                if (MAdapter.NotificationsList.Count > 0)
                {
                    MRecycler.Visibility        = ViewStates.Visible;
                    EmptyStateLayout.Visibility = ViewStates.Gone;
                }

                if (Methods.CheckConnectivity())
                {
                    PollyController.RunRetryPolicyFunction(new List <Func <Task> > {
                        () => LoadVisitsAsync()
                    });
                }


                if (Build.VERSION.SdkInt < BuildVersionCodes.Lollipop)
                {
                    return;
                }

                Activity.Window.ClearFlags(WindowManagerFlags.TranslucentStatus);
                Activity.Window.AddFlags(WindowManagerFlags.DrawsSystemBarBackgrounds);
                Activity.Window.SetStatusBarColor(Color.ParseColor(AppSettings.MainColor));
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception);
            }
        }
示例#2
0
        private void ResetTabsButtonOnLikesClick()
        {
            try
            {
                MatchesImage.SetColorFilter(Color.ParseColor("#A1A1A1"));
                MatchesTextView.SetTextColor(Color.ParseColor("#A1A1A1"));
                MatchesLayout.SetBackgroundResource(Resource.Drawable.Shape_Radius_Line_Grey);
                MatchesButton.Tag = "UnClicked";

                VisitsImage.SetColorFilter(Color.ParseColor("#A1A1A1"));
                VisitsTextView.SetTextColor(Color.ParseColor("#A1A1A1"));
                VisitsLayout.SetBackgroundResource(Resource.Drawable.Shape_Radius_Line_Grey);
                VisitsButton.Tag = "UnClicked";
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }