private void LikesButtonOnClick(object sender, EventArgs e) { try { MAdapter.NotificationsList.Clear(); MAdapter.NotificationsList = ListUtils.LikesList; MAdapter.NotifyDataSetChanged(); ToolbarView.SetBackgroundResource(Resource.Drawable.Shape_Gradient_Normal2); LikesImage.SetColorFilter(Color.ParseColor("#ffffff")); LikesTextView.SetTextColor(Color.ParseColor(AppSettings.MainColor)); LikesLayout.SetBackgroundResource(Resource.Drawable.Shape_Radius_Gradient_Btn2); LikesButton.Tag = "Clicked"; ResetTabsButtonOnLikesClick(); if (MAdapter.NotificationsList.Count > 0) { MRecycler.Visibility = ViewStates.Visible; EmptyStateLayout.Visibility = ViewStates.Gone; } if (Methods.CheckConnectivity()) { PollyController.RunRetryPolicyFunction(new List <Func <Task> > { LoadLikesAsync }); } 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); } }
private void ResetTabsButtonOnVistsClick() { try { MatchesImage.SetColorFilter(Color.ParseColor("#A1A1A1")); MatchesTextView.SetTextColor(Color.ParseColor("#A1A1A1")); MatchesLayout.SetBackgroundResource(Resource.Drawable.Shape_Radius_Line_Grey); MatchesButton.Tag = "UnClicked"; LikesImage.SetColorFilter(Color.ParseColor("#A1A1A1")); LikesTextView.SetTextColor(Color.ParseColor("#A1A1A1")); LikesLayout.SetBackgroundResource(Resource.Drawable.Shape_Radius_Line_Grey); LikesButton.Tag = "UnClicked"; } catch (Exception e) { Console.WriteLine(e); } }