Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

How do you remove / customize the bar at the bottom of a TabHost?

$
0
0

At the end of the day, I'm trying to have a white bar at the bottom of my active TabHost item.

Right now I'm trying to remove it, so that I can add my own in as a drawable.

I've tried in xml

    <TabWidget
        android:id="@android:id/tabs"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:tabStripEnabled="false"
        android:background="@drawable/tab_indicator"/>

And I've tried in code

    private void CreateTab(Type activityType, string tag, string label)
    {
        var intent = new Intent(this, activityType);
        intent.AddFlags(ActivityFlags.NewTask);

        var spec = TabHost.NewTabSpec(tag);
        spec.SetIndicator(label);
        spec.SetContent(intent);

        TabHost.TabWidget.StripEnabled = false;
        TabHost.AddTab(spec);
    }

But unfortunately, neither of these approaches have worked.

I need to remove the thin blue bar to be white, and I need the active indicator to also be white.

Any advice on how to do this?


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>