Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] Android frame with undeclared padding since XF4.4 #9750

Open
leo-adm opened this issue Feb 27, 2020 · 8 comments
Open

[Bug] Android frame with undeclared padding since XF4.4 #9750

leo-adm opened this issue Feb 27, 2020 · 8 comments
Labels
4.4.0 regression on 4.4.0 a/frame a/layout i/high Completely doesn't work, crashes, or is unusably slow, has no obvious workaround; occurs less often i/regression p/Android t/bug 🐛

Comments

@leo-adm
Copy link

leo-adm commented Feb 27, 2020

Description

I have the following xaml file containing a stacklayout with a frame:

<StackLayout Margin="8">
    <Frame HasShadow="True" BackgroundColor="Gray" HorizontalOptions="FillAndExpand">
        <Grid RowSpacing="1" ColumnSpacing="1" VerticalOptions="FillAndExpand">
            <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition >
                    <RowDefinition.Height>
                        <OnPlatform x:TypeArguments="GridLength">
                            <On Platform="iOS" Value="24" />
                            <On Platform="Android" Value="60" />
                            <On Platform="UWP" Value="60" />
                        </OnPlatform>
                        <!--<OnPlatform x:TypeArguments="GridLength" iOS="24" Android="60" WinP hone="60" />-->
                    </RowDefinition.Height>
                </RowDefinition>
                <RowDefinition Height="Auto" >
                    <!--<RowDefinition.Height>
                                    <OnPlatform x:TypeArguments="GridLength" iOS="24" Android="35" WinPh one="20" />
                                </RowDefinition.Height>-->
                </RowDefinition>
                <RowDefinition Height="0.3"/>
            </Grid.RowDefinitions>

            <!--4 linhas-->
            <Label Text="NomeCliente" HorizontalTextAlignment="Start" VerticalTextAlignment="Start" FontSize="Medium" Margin="-10"/>
            <BoxView HorizontalOptions="Fill" VerticalOptions="Start" Grid.Row="3" Color="Green" Margin="-20" />

            <BoxView VerticalOptions="Fill" HorizontalOptions="Start" WidthRequest="5" Color="Blue" Margin="-20" Grid.RowSpan="3" />
            <!--<BoxView VerticalOptions="Fill" HorizontalOptions="Start" Grid.Row="1" WidthRequest="5" Color="{StaticResource CorDestaque}" Margin="-20" />
                                <BoxView VerticalOptions="Fill" HorizontalOptions="Start" Grid.Row="2" WidthRequest="5" Color="{StaticResource CorDestaque}" Margin="-20" />
                                <BoxView VerticalOptions="Fill" HorizontalOptions="Start" Grid.Row="3" WidthRequest="5" Color="{StaticResource CorDestaque}" Margin="-20" />-->

            <Grid Grid.Row="1" HorizontalOptions="Start">
                <Grid.ColumnDefinitions >
                    <ColumnDefinition />
                    <ColumnDefinition />
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>

                <Label Text="DescricaoNumNF" VerticalTextAlignment="Center" HorizontalTextAlignment="Start"/>
                <Label Text="TipoRep" HorizontalTextAlignment="Center" Grid.Column="1" VerticalTextAlignment="Center"/>

                <!--ICONE DA FILIAL-->
                <Label Grid.Column="2" VerticalTextAlignment="Center" >
                    <Label.FormattedText >
                        <FormattedString>
                            <Span Text="IC" FontSize="15" TextColor="Black"/>
                            <Span Text="   "/>
                            <Span Text="FilialDest"/>
                        </FormattedString>
                    </Label.FormattedText>
                </Label>
            </Grid>

            <Grid Grid.Row="1" HorizontalOptions="End">
                <!--ICONES: 1= CATALOGO; 2=STATUS ENVIO; 3= ON/OFF-->
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition />
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>

                <!--ICONE DO CATALOGO-->
                <Label Text="&#xf02d;"  FontSize="15" TextColor="Brown" HorizontalTextAlignment="End" VerticalTextAlignment="Center" IsVisible="False"/>

                <!--ICONE DO STATUS DESTINO-->
                <Label Text="IC>" Grid.Column="1" FontSize="15" TextColor="Red" HorizontalTextAlignment="End" VerticalTextAlignment="Center"/>

                <!--ICONE ON/OFF-->
                <Label Grid.Column="2" VerticalTextAlignment="Center" >
                    <Label.FormattedText >
                        <FormattedString>
                            <Span Text="IC" FontSize="15" TextColor="Yellow"/>
                            <Span Text=" "/>
                            <Span Text="sla"/>
                        </FormattedString>
                    </Label.FormattedText>
                </Label>
            </Grid>

            <Label Grid.Row="2" VerticalOptions="EndAndExpand" HorizontalTextAlignment="End" VerticalTextAlignment="End" Margin="-8">
                <Label.FormattedText >
                    <FormattedString>
                        <Span Text="IC" TextColor="Black" FontSize="15" />
                        <Span Text=" "/>
                        <Span Text="27/2/2020"/>
                    </FormattedString>
                </Label.FormattedText>
            </Label>

            <Label Text="DescPedido" Grid.Row="2" VerticalTextAlignment="End" HorizontalTextAlignment="Start" TextColor="Purple" Margin="-10" />
        </Grid>
    </Frame>
</StackLayout>

The frame is OK in xamarin forms 4.3, but since 4.4 it is broken with a strange padding. I've tried to set the frame padding to 0 but nothing changes. I dont know what I'm doing wrong. Can you help me? I don't know if it is a Bug or a bad code.

Steps to Reproduce

  1. Run the reproduction project in XF 4.3
  2. Update the project to XF 4.5
  3. Run

Expected Behavior

Frame layout keep the same

Actual Behavior

Frame layout looks broken because of a padding

Basic Information

  • Version with issue: XF4.4+
  • Last known good version: XF4.3
  • Platform Target Frameworks:
    • Android: 5.0+

Screenshots

Frame in Forms 4.3
Screenshot_1582806452

Frame in Forms 4.5
Screenshot_1582806752

Reproduction Link

FrameBug.zip

Workaround

@leo-adm leo-adm added s/unverified New report that has yet to be verified t/bug 🐛 labels Feb 27, 2020
@pauldipietro pauldipietro added this to New in Triage Feb 27, 2020
@jsuarezruiz jsuarezruiz added a/frame p/Android a/layout i/high Completely doesn't work, crashes, or is unusably slow, has no obvious workaround; occurs less often and removed s/unverified New report that has yet to be verified labels Feb 27, 2020
@jsuarezruiz jsuarezruiz moved this from New to Needs Info in Triage Feb 27, 2020
@jsuarezruiz jsuarezruiz moved this from Needs Info to Needs Estimate in Triage Feb 27, 2020
@samhouts samhouts added this to the 4.4.0 milestone Feb 27, 2020
@samhouts samhouts added this to To do in v4.4.0 Feb 27, 2020
@leo-adm
Copy link
Author

leo-adm commented Feb 28, 2020

If it helps in UWP it works fine

@Transis-Felipe
Copy link
Contributor

I have the same problem

@samhouts samhouts added the 4.4.0 regression on 4.4.0 label Apr 17, 2020
@samhouts samhouts removed this from the 4.4.0 milestone Apr 17, 2020
@Transis-Felipe
Copy link
Contributor

Transis-Felipe commented May 2, 2020

Hi people,

This error still hapens with XF 4.6

Waiting for the fix

@Transis-Felipe
Copy link
Contributor

Transis-Felipe commented May 7, 2020

Hi @samhouts,

Can you add the 4.6.0 label/milestone to this issue ?
This issue in only on Triage project and 4.4.0 was closed.

I'm locked on XF 4.3 because this bug.

@samhouts
Copy link
Member

samhouts commented May 8, 2020

@transis2 That label just lets us keep track of when the regression started. We'll definitely merge the fix into the next available release. Thanks!

@Transis-Felipe
Copy link
Contributor

Thank you @samhouts

@vivisardi
Copy link

g for the fix

It´s hapening to mee too. Waiting for some solution;

@Transis-Felipe
Copy link
Contributor

Any news on this ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
4.4.0 regression on 4.4.0 a/frame a/layout i/high Completely doesn't work, crashes, or is unusably slow, has no obvious workaround; occurs less often i/regression p/Android t/bug 🐛
Projects
Triage
  
Needs Estimate
v4.4.0
  
To do
Development

No branches or pull requests

5 participants