0
votes

Hello friends how are you? I tell you that I have a tabbedpage that aims to show a list of elements. These elements have different states and not to saturate a listview, I decided to create a tab for each state. This works well, the only problem is that the text of the tabs titles are cut. I understand that it is because of the screen size. But I have seen apps that have multiple tabs that are hidden and when they press other tabs they appear. In summary, how can I make the text appear complete in the tab titles? Try WidthRequest, but this does not work. I thank you for the help you can give me.

 <ContentPage Title="Tab 1"  MinimumWidthRequest="222" WidthRequest="222" />
 <ContentPage Title="Tab 2"  MinimumWidthRequest="222" WidthRequest="222" />
 <ContentPage Title="Tab 3"  MinimumWidthRequest="222" WidthRequest="222" />

xa

1
Just to be clear, you want to make the selected tab item text to fit and the other ones hide/short?Ricardo Dias Morais
I want the text of the tabs to be displayed full.user8564782

1 Answers

0
votes

You could reset the app:tabMode from "fixed" to "scrollable".

In Xamarin.forms, Android> Resources> layout> Tabbar.xml:

Change:

app:tabMode="fixed" 

enter image description here

To:

app:tabMode="scrollable" 

enter image description here

Please make sure you have the code below in your MainActivity.

  TabLayoutResource = Resource.Layout.Tabbar;