Label names not displaying in nested Tabs

Thombre, Ashish 125 Reputation points
2023-11-22T06:15:31.6533333+00:00

enter image description here

enter image description here

  1. Label names not displaying in nested Tabs it should be like screen 2 - (refer screen 1) when clicked on Service History Tab - (Refer screen 2)
  2. First 2 Tabs icon are in white color and 3rd in black color, all icons should be should be in white color

Currently, i am referring below code



public class ScrollableTabbedViewHandler : TabbedViewHandler

{

    [Obsolete]

    public override void UpdateValue(string property)

    {

        base.UpdateValue(property);

        var tabs = Platform.CurrentActivity?.FindViewById<FragmentContainerView>(Microsoft.Maui.Resource.Id

            .navigationlayout_toptabs);

        var tabLayout = tabs?.GetChildAt(0);

        if (tabLayout is TabLayout layout)

        {

            layout.TabMode = TabLayout.ModeScrollable;

            layout.SetSelectedTabIndicatorColor(Color.FromRgb(44,82,52).ToAndroid());

   //         layout.SetTabIconTintResource(Color.FromRgb(255, 255, 255).ToAndroid());

  //          layout.SetTabTextColors(Color.FromRgb(255, 255, 255).ToAndroid(), Color.FromRgb(255, 255, 255).ToAndroid());

            layout.SetSelectedTabIndicatorHeight(12);

            for (int i = 0; i < layout.TabCount; i++)

            {

                TabLayout.Tab? tab = layout.GetTabAt(i);

                TabLayout.TabView? view = tab?.View;

                for (int j = 0; j < (view?.ChildCount ?? 0); j++)

                {

                    var child = view?.GetChildAt(j);

                    if (child is TextView tv)

                    {

                        tv.SetAllCaps(false);

                    }

                }

            }

        }

    }

}
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,207 questions
{count} votes