private void TabLayout_TabUnselected(object sender, TabLayout.TabUnselectedEventArgs e) { var resolved = ContextCompat.GetColor(this, Resource.Color.TabUnselected); var tab = e.Tab; var imageView = tab.CustomView as ImageView; imageView.SetColorFilter(new global::Android.Graphics.Color(resolved)); }
private void TabLayoutOnTabUnselected(object sender, TabLayout.TabUnselectedEventArgs e) { try { e.Tab.Icon.SetColorFilter(new PorterDuffColorFilter(AppSettings.SetTabDarkTheme ? Color.White : Color.Gray, PorterDuff.Mode.SrcIn)); } catch (Exception exception) { Console.WriteLine(exception); } }
private void TabLayout_TabUnselected(object sender, TabLayout.TabUnselectedEventArgs e) { var tab = e.Tab; tab.Icon?.SetColorFilter(_unselectedColor, PorterDuff.Mode.SrcIn); }
private void TabLayout_TabUnselected(object sender, TabLayout.TabUnselectedEventArgs e) { TextView tv = e.Tab.CustomView.FindViewById <TextView>(Resource.Id.custTab_title); tv.SetTypeface(null, Android.Graphics.TypefaceStyle.Normal); }