Forum Xamarin.Forms

Wrapping text in a tabbed page label

JoshuaJanikowskiJoshuaJanikowski USMember
edited November 2015 in Xamarin.Forms

I have 3 tabs and the last tab the title does not show completely. Is there a way to expand the width of the tab label? Or to wrap the text?

`

<TabbedPage.ToolbarItems WidthRequest="150">

</TabbedPage.ToolbarItems>
`

Tagged:

Answers

  • VIVEKNEGIVIVEKNEGI USMember ✭✭✭

    Did you get any solution?

  • VIVEKNEGIVIVEKNEGI USMember ✭✭✭

    Change tabmode="fixed" to
    app:tabMode="scrollable"

  • OfaimOfaim Member ✭✭

    Hey guys...
    "scrollable" tabs does not occupy the entire width of the screen, they are just wide enough to hold their text.
    Is there any way to make tabs occupy the entire width of the screen (or more, but not less!) + make them to not truncate the text?

    I'm guessing that what I'm looking for is a "scrollable" tabs that their minimal combined width can be determined (I want it to be the width of the screen).

    Notes:
    1. In my particular case I'm adding and removing tabs on runtime (this is already implemented and working).
    2. I'm new to Xamarin and app developing in general. In fact, this is my first post to anything on that site :)

    This is what I've got so far (at the "Tabbar.xml" layout in the Android resources):

    android:id="@+id/sliding_tabs"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:theme="@style/Base.Theme.AppCompat.Light"
    app:tabGravity="center"
    app:tabMode="scrollable"
    
Sign In or Register to comment.