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

Text Alignment Issue in IOS #12273

Open
ShamineDsouza opened this issue Sep 27, 2020 · 4 comments
Open

Text Alignment Issue in IOS #12273

ShamineDsouza opened this issue Sep 27, 2020 · 4 comments
Labels
a/listview Problems with the ListView/TableView a/rtl p/iOS 🍎 t/bug 🐛
Projects

Comments

@ShamineDsouza
Copy link

I have observed another issue that the text alignment is not proper . I have two languages Arabic and English . in android it aligns them properly to right and left accordingly .
However in IOS there seems to be a problem, If I set flow direction , even English moves towards the right.

@ShamineDsouza ShamineDsouza added s/unverified New report that has yet to be verified t/bug 🐛 labels Sep 27, 2020
@samhouts samhouts added this to New in Triage Sep 27, 2020
@alibabaan
Copy link

When I set flow direction to RTL , the button content appears incorrectly.
Arabic language move toward left and image toward right .

@hartez
Copy link
Contributor

hartez commented Oct 1, 2020

@ShamineDsouza Can you post a repro project, or at least the markup/code you're using for the button/text which aren't displaying correctly? Also, screenshots of Android and iOS would be very helpful so we can see the differences.

@hartez hartez moved this from New to Needs Info in Triage Oct 1, 2020
@hartez hartez added the s/needs-info ❓ A question has been asked that requires an answer before work can continue on this issue. label Oct 1, 2020
@ShamineDsouza
Copy link
Author

Hi ,

Below is a portion of the code , In android it works perfectly . However in IOS the alignment is not correct .
If I set flow direction in list view all the text irrespective of the language moves to right or left as set in flow direction .
But everything works perfectly in android.

        <ContentView VerticalOptions="Start"    HorizontalOptions="StartAndExpand"  Padding="0"   >
            <Grid Margin="1,1,1,1"  Padding="2,2,2,2"  BackgroundColor="{ DynamicResource MainWrapperBackgroundColor }">

                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="4*" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"    />
                    <RowDefinition Height="Auto"  />
                </Grid.RowDefinitions>

                    <Button Text="{ x:Static local:GrialIconsFont.ArrowCircleRight }" x:Name="Next" Grid.Column="0"  Grid.Row="0" 
                        FontFamily="{ StaticResource GrialIconsFill }" HorizontalOptions="Center"
						Style="{ StaticResource CircleActionButtonGradientStyle }" Clicked="Next_Clicked"></Button>

                                <ActivityIndicator x:Name="activityIndicatorLoad" IsVisible="{ Binding IsIndicatorVisible }" IsRunning="{ Binding IsIndicatorRunning }"  
                                                   Grid.Column="1"  Grid.Row="0"  HorizontalOptions="Center"  ></ActivityIndicator>
                  
                    <Button Text="{ x:Static local:GrialIconsFont.ArrowCircleLeft }" x:Name="Previous" Grid.Column="2" Grid.Row="0" 
                        IsVisible="False" FontFamily="{ StaticResource GrialIconsFill }" HorizontalOptions="Center"
						Style="{ StaticResource CircleActionButtonGradientStyle }" Clicked="Previous_Clicked"></Button>

            </Grid>
        </ContentView>


                        <StackLayout Padding="10" x:Name="TV1" IsVisible="True" >
                        
                            <Label Text="Enter your CPR" TextColor="White"></Label>
                            <input:AdvancedEntry
                                        Title=""
                                        Annotation="Phone"
                                        AnnotationColor="Crimson"
                                        IsRequired="True"
                                        MaxLength="9"
                                        MinLength="9"
                                        HeightRequest="70"
                                        TextFontSize="10"
                                        Placeholder="999988888"
                                        Text="{Binding CPR}"
                                         x:Name="txtCheckCPRNumber"
                                        TextColor="Black"
                                FlowDirection="LeftToRight"
                                        ValidationMessage="Please type your CPR number correctly" />

                            <Label Text="Select your ministry" TextColor="White"></Label>
                            <ListView x:Name="ddlMinistry"
                                        HorizontalScrollBarVisibility="Always"
                                        VerticalScrollBarVisibility="Always"
                                        HorizontalOptions="Fill"
                                        ItemsSource="{Binding MyList}" 
                                        SelectedItem="{Binding SelectedItem}"
                                        VerticalOptions="CenterAndExpand" >
                                <ListView.Header>
                                    <Grid Grid.Column="0" BackgroundColor="{DynamicResource MainMenuGradient}" Opacity="0.8" >
                                        <SearchBar x:Name="searchBar"
                                                       HorizontalOptions="Fill"
                                                       VerticalOptions="CenterAndExpand"
                                                       Placeholder="Search ..."
                                                       Style="{ StaticResource TranslucidSearchBarStyle }"
                                                       HorizontalTextAlignment="Start"
                                                       TextChanged="SearchBar_TextChanged"/>

                                        <Label Text="Select the Ministry"
                                               FontSize="Medium"
                                               FontAttributes="Bold"
                                               FlowDirection="LeftToRight"
                                               Grid.Row="1"
                                               Margin="5"
                                               HorizontalOptions="Fill"
                                               VerticalOptions="CenterAndExpand" ></Label>
                                    </Grid>
                                    
                                  
                                </ListView.Header>
                            </ListView>
                   
                        </StackLayout>
            </input:FormView>
    </StackLayout>

Android
Android

IOS (** Please check the list records)
IOS

@samhouts samhouts removed the s/needs-info ❓ A question has been asked that requires an answer before work can continue on this issue. label Oct 1, 2020
@samhouts samhouts moved this from Needs Info to New in Triage Oct 1, 2020
@jsuarezruiz
Copy link
Contributor

The behavior is different in Android and iOS. Attached a reproduction sample:
Issue12273.zip

@jsuarezruiz jsuarezruiz added the a/listview Problems with the ListView/TableView label Oct 7, 2020
@jsuarezruiz jsuarezruiz moved this from New to Needs Info in Triage Oct 7, 2020
@jsuarezruiz jsuarezruiz moved this from Needs Info to Needs Estimate in Triage Oct 7, 2020
@jsuarezruiz jsuarezruiz removed the s/unverified New report that has yet to be verified label Oct 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a/listview Problems with the ListView/TableView a/rtl p/iOS 🍎 t/bug 🐛
Projects
Triage
  
Needs Estimate
Development

No branches or pull requests

5 participants