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

TextView height doesn't work #138

Closed
BenjaNapo opened this issue Jun 22, 2020 · 8 comments
Closed

TextView height doesn't work #138

BenjaNapo opened this issue Jun 22, 2020 · 8 comments
Labels
Resolution/Fixed The described issue is fixed. Type/Bug

Comments

@BenjaNapo
Copy link

Describe the bug

TextView height is not set properly based on text length, indeed it change drastically just adding a single character

To Reproduce

I created two ListView with just one char of difference in this way:

                <ListView
                    Margin="0,10,0,0"
                    HasUnevenRows="true"
                    ItemTapped="ListView_ItemTapped"
                    ItemsSource="{Binding DomandaAttuale.Risposte}"
                    SelectionMode="None"
                    VerticalOptions="Center">
                    <ListView.ItemTemplate>
                        <DataTemplate>
                            <ViewCell>
                                <Grid VerticalOptions="CenterAndExpand">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="1*" />
                                        <ColumnDefinition Width="9*" />
                                    </Grid.ColumnDefinitions>
                                    <ia:Checkbox
                                        FillColor="{DynamicResource PrimaryColor}"
                                        IsChecked="{Binding Selezionata}"
                                        IsCheckedChanged="Checkbox_IsCheckedChanged"
                                        OutlineColor="{DynamicResource PrimaryColor}"
                                        Shape="Circle" />
                                    <math:TextView
                                        Grid.Column="1"
                                        FontSize="35"
                                        LaTeX="L'insieme dei nu"
                                        TextAlignment="Left"
                                        VerticalOptions="Center" />
                                </Grid>
                            </ViewCell>
                        </DataTemplate>
                    </ListView.ItemTemplate>
                </ListView>

Expected behavior

This is the result with the text "L'insieme dei nu":
Screenshot_1592831636 (2)

And this is the result with the text "L'insieme dei num":
Screenshot_1592831650 (2)

@BenjaNapo BenjaNapo added Status/0. New This issue is new and is awaiting confirmation from the maintainers. Type/Bug labels Jun 22, 2020
@Happypig375
Copy link
Collaborator

My instinct tells me that this is related to #136.

@BenjaNapo
Copy link
Author

I saw that issue too but I didn't know if they were related, but if you say so I'll follow that issue👌🏻 Hope it will work for mine too when fixed :P

@Happypig375
Copy link
Collaborator

Not reproducing on latest master
with

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:d="http://xamarin.com/schemas/2014/forms/design"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:local="clr-namespace:CSharpMath.Forms;assembly=CSharpMath.Forms"
             mc:Ignorable="d"
             x:Class="CSharpMath.Forms.Example.Test">
    <ScrollView>
        <StackLayout>
            <local:TextView BackgroundColor="LightSalmon" HighlightColor="LightYellow" LaTeX="L'insieme dei nu"/>
            <local:TextView BackgroundColor="LightGreen" HighlightColor="LightBlue" LaTeX="L'insieme dei nu"/>
            <local:TextView BackgroundColor="LightSalmon" HighlightColor="LightYellow" LaTeX="L'insieme dei num"/>
            <local:TextView BackgroundColor="LightGreen" HighlightColor="LightBlue" LaTeX="L'insieme dei num"/>
            <ListView
                    Margin="0,10,0,0"
                    HasUnevenRows="true"
                    SelectionMode="None"
                    VerticalOptions="Center">
                <ListView.ItemsSource>
                    <x:Array Type="{x:Type x:Int32}">
                        <x:Int32>1</x:Int32>
                        <x:Int32>2</x:Int32>
                        <x:Int32>3</x:Int32>
                    </x:Array>
                </ListView.ItemsSource>
                <ListView.ItemTemplate>
                    <DataTemplate>
                        <ViewCell>
                            <Grid VerticalOptions="CenterAndExpand">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="1*" />
                                    <ColumnDefinition Width="9*" />
                                </Grid.ColumnDefinitions>
                                <CheckBox />
                                <local:TextView
                                        Grid.Column="1"
                                        FontSize="35"
                                        LaTeX="L'insieme dei num"
                                        TextAlignment="Left"
                                        VerticalOptions="Center" />
                            </Grid>
                        </ViewCell>
                    </DataTemplate>
                </ListView.ItemTemplate>
            </ListView>
        </StackLayout>
    </ScrollView>
</ContentPage>

image

@Happypig375 Happypig375 added Status/½. Needs a reproduction A reproduction method needs to be provided for this bug to continue. and removed Status/0. New This issue is new and is awaiting confirmation from the maintainers. labels Jun 23, 2020
@BenjaNapo
Copy link
Author

I've downloaded the latest Nightly Package but it still the same:
Screenshot_1592992538

Any idea? I don't think it's my """fault""" because it shows well writing "L'insieme dei nu"

@Happypig375
Copy link
Collaborator

I cannot confirm this bug because I have not seen it happen yet and it is not debuggable. Try uploading a zipped file of a solution that exhibits this problem.

@Happypig375
Copy link
Collaborator

This is probably fixed with #136 and #137. Can you confirm?

@Happypig375 Happypig375 added Status/4. Awaiting author confirmation Awaiting a confirmation from the author of this issue that this issue has been resolved as expected. and removed Status/½. Needs a reproduction A reproduction method needs to be provided for this bug to continue. labels Jul 19, 2020
@MartinZikmund
Copy link

Will check!

@BenjaNapo
Copy link
Author

Height issue resolved! Nice work 😁

@Happypig375 Happypig375 added Resolution/Fixed The described issue is fixed. Status/5. Awaiting next release This issue has been resolved and is waiting for the next release/prerelease. and removed Status/4. Awaiting author confirmation Awaiting a confirmation from the author of this issue that this issue has been resolved as expected. labels Jul 23, 2020
@Happypig375 Happypig375 removed the Status/5. Awaiting next release This issue has been resolved and is waiting for the next release/prerelease. label Oct 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution/Fixed The described issue is fixed. Type/Bug
Projects
None yet
Development

No branches or pull requests

3 participants