SfTabViewItem no visible header on Android (UWP works)

Dear community,

I'm testing my code on Android and didn't expect following result:

This is my piece of code that creates SfTabViewItems dynamically:

private void SeedNewTab(Berechnung berechnung = null)

{
var tab = new SfTabItem();
var content = new ErfassungDarlehen(berechnung);
var context = (DarlehensrechnerViewModel)content.BindingContext;
tab.Title = context.Berechnung.Name;
var headerContent = new StackLayout() { Orientation = StackOrientation.Horizontal };
var title_label = new Label
{
FontSize = Device.GetNamedSize(NamedSize.Caption, typeof(Label)),
Text = tab.Title,
TextColor = (Color)MarkupExtensions.GetResourceValue("PrimaryColor"),
HorizontalOptions = LayoutOptions.CenterAndExpand,
VerticalOptions = LayoutOptions.Center
};

headerContent.Children.Add(title_label);
var close_label = new Label
{
FontFamily =(OnPlatform)MarkupExtensions.GetResourceValue("FontAwesomeLight"),
FontSize = Device.GetNamedSize(NamedSize.Micro, typeof(Label)),
Text = Extensions.Icon.Close_Circle,
HorizontalOptions = LayoutOptions.End,
VerticalOptions = LayoutOptions.Center
};

close_label.GestureRecognizers.Add(new TapGestureRecognizer { Command = this.CloseCommand });
headerContent.Children.Add(close_label);
tab.HeaderContent = headerContent;
var scrollView = new ScrollView();
scrollView.Content = new ContentView() { Content = content };
tab.Content = scrollView;
//Position bestimmen
if (BerechnungenTabView.Items.Contains(Mediator.CurrentTab))
{
BerechnungenTabView.Items.Insert(BerechnungenTabView.Items.IndexOf(Mediator.CurrentTab), tab);
}
else
{
BerechnungenTabView.Items.Add(tab);
Mediator.CurrentTab = BerechnungenTabView.Items[0];
}

}

This View is from UWP:

Screenshot 2021-07-03 232043.png

And on Android it's:

Screenshot_20210703-233028.jpg

Ah and here's my SfTabView Control:

<tabview:SfTabView x:Name="BerechnungenTabView"                               

EnableSwiping="False" HeightRequest="1080" OverflowMode="Scroll"                               
SelectionChanged="TabViewSelectionChanged" TabWidthMode="BasedOnText">

4 Replies 1 reply marked as answer

JK Jeya Kasipandi Syncfusion Team July 5, 2021 12:34 PM UTC

 Hi Marco,

Greetings from Syncfusion.

Currently, we are validating on this and will update the details on July 7,2021. We appreciate your patience until then.

Regards,
Jeya K 



JK Jeya Kasipandi Syncfusion Team July 7, 2021 02:57 PM UTC

Hi Marco,

Thanks for the patience.

We have validated your query and we would like to inform you that TabWidthmode BasedonText support only for default title text and not applicable for custom header.If you have used custom header only means we suggest you don't need to set the TabWidthmode property to BasedOnText.

Can you please check the reported issue occur without the TabWidthmode BasedonText or not and let us know?

Regards,
Jeya K

Marked as answer

MA Marco replied to Jeya Kasipandi July 12, 2021 08:40 PM UTC

Hello Jeya,

thank you very much for that quick solution. Everything is working fine by now I appreciate your service.


Good bye



JK Jeya Kasipandi Syncfusion Team July 13, 2021 12:05 PM UTC

Hi Marco,

Thanks for the update.

Please let us know, if you have any other queries.

Regards,
Jeya K

Loader.
Up arrow icon