Open galadril opened 4 years ago
Probably related to https://github.com/UdaraAlwis/XFSegmentedControl/issues/3
I've changed the code of the control a bit, so it works on the latest fast renderers on Android.
<?xml version="1.0" encoding="UTF-8" ?>
<Grid
x:Class="Xam.Controls.TabButton"
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
IsClippedToBounds="True"
RowSpacing="0">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="1" />
</Grid.RowDefinitions>
<Button
x:Name="TabButtonView"
Grid.Row="0"
Margin="-2,-3,-2,0"
Clicked="TabButton_OnClicked" />
<BoxView
x:Name="HorizontalIndicator"
Grid.Row="1"
HeightRequest="2"
InputTransparent="True"
IsVisible="False"
VerticalOptions="End" />
</Grid>
So I've set the horizonal line to the second row of the grid, with height 1 on the grid
There is a layout issue if you update the Android/Xamarin Forms libraries like shown in the screenshot below:
Then the visibility of the label/horizontal view isn't set correctly anymore when you use the tab button. It is still working if you set the SelectedTabIndex (so dont use the button).
Screenshots