Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xamarin forms 4.4.0 gives layout issues on Android #6

Open
galadril opened this issue Jan 6, 2020 · 2 comments
Open

Xamarin forms 4.4.0 gives layout issues on Android #6

galadril opened this issue Jan 6, 2020 · 2 comments

Comments

@galadril
Copy link

galadril commented Jan 6, 2020

There is a layout issue if you update the Android/Xamarin Forms libraries like shown in the screenshot below:
afbeelding

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
Screenshot_2020-01-06-16-43-05-673_com companyname XFSegmentedControl

Screenshot_2020-01-06-16-42-55-362_com companyname XFSegmentedControl

Screenshot_2020-01-06-16-43-10-844_com companyname XFSegmentedControl

@galadril
Copy link
Author

galadril commented Jan 6, 2020

Probably related to #3

@galadril
Copy link
Author

galadril commented Jan 7, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant