コード例 #1
0
        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));
        }
コード例 #2
0
 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);
     }
 }
コード例 #3
0
        private void TabLayout_TabUnselected(object sender, TabLayout.TabUnselectedEventArgs e)
        {
            var tab = e.Tab;

            tab.Icon?.SetColorFilter(_unselectedColor, PorterDuff.Mode.SrcIn);
        }
コード例 #4
0
        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);
        }