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

[Bug] Entry HorizontalTextAlignment does not work #8140

Closed
acaliaro opened this issue Oct 22, 2019 · 37 comments
Closed

[Bug] Entry HorizontalTextAlignment does not work #8140

acaliaro opened this issue Oct 22, 2019 · 37 comments

Comments

@acaliaro
Copy link

Description

Setting HorizontalTextAlignment in an Entry does not work

Steps to Reproduce

  1. Add an Entry
                <Entry
                    Grid.Row="0"
                    Grid.Column="1"
                    FontSize="Large"
                    HorizontalTextAlignment="Center"
                    Keyboard="Numeric"
                    Placeholder="{utility:Translate Quantita}"
                    Text="{Binding Quantita}" />
  1. Set HotizontalTextAlignment to "Center"

Expected Behavior

Text should appear centered

Actual Behavior

It's left aligned

Basic Information

  • Version with issue: 4.3.0.908675

  • Last known good version: 4.2.0.xxxxx

  • IDE: Visual Studio 2019

  • Platform Target Frameworks:

    • Android:
  • Affected Devices: Zebra TC51

Screenshots

Reproduction Link

image

@acaliaro acaliaro added s/unverified New report that has yet to be verified t/bug 🐛 labels Oct 22, 2019
@KennyDizi
Copy link

related to #8137

@czuvich
Copy link

czuvich commented Oct 23, 2019

Is there a workaround?

@acaliaro
Copy link
Author

I think you can try with a CustomRenderer… @czuvich

@czuvich
Copy link

czuvich commented Oct 23, 2019

I think you can try with a CustomRenderer… @czuvich

It looks like Forms needs to set the Gravity along with the TextAlignment on the EditText. I was able to fix it.

@Adlorem
Copy link

Adlorem commented Oct 23, 2019

It is working in previous version of Forms.

@samhouts samhouts added this to the 4.3.0 milestone Oct 23, 2019
@samhouts samhouts added i/regression p/Android s/needs-info ❓ A question has been asked that requires an answer before work can continue on this issue. s/needs-repro ❔ This reported issue doesn't include a sample project reproducing the issue. Please provide one. labels Oct 23, 2019
@samhouts
Copy link
Member

@acaliaro Can you please attach a small project that demonstrates this issue? Thanks!

@Basti82b
Copy link

It is working in previous version of Forms.

I can confirm that. It's a bug in XF 4.3.0.908675.

@acaliaro
Copy link
Author

@acaliaro Can you please attach a small project that demonstrates this issue? Thanks!

HorizontalTextAlignment.zip

@samhouts samhouts removed s/needs-info ❓ A question has been asked that requires an answer before work can continue on this issue. s/needs-repro ❔ This reported issue doesn't include a sample project reproducing the issue. Please provide one. labels Oct 24, 2019
@hartez hartez removed the s/unverified New report that has yet to be verified label Oct 28, 2019
@SandraHicks
Copy link

Can confirm, also got this bug after updating to 4.3.0.908675 in Android.

@rotorgames
Copy link
Contributor

I have the same issue with 4.3.0.947036. Android only.

@AdrianoRochedo
Copy link

AdrianoRochedo commented Oct 31, 2019

Same issue for me (android only) after updating to 4.3.0 !

image

@ChaseFlorell
Copy link

add me to the list of users running into this same issue.

@ybadragon
Copy link

Add me to the list of users as well.

@akamud
Copy link
Contributor

akamud commented Nov 13, 2019

Same problem here.

@veringm
Copy link

veringm commented Nov 15, 2019

Also add me to the list of users as well.

@Xiokraze
Copy link

Same here

@thomasgalliker
Copy link

Bug is still present in Xamarin.Forms 4.3.0.991211. Going back to 4.2.0.910310, the Entry texts are aligned again. I wonder how such things can pass a release process? I mean, we all code day and night and mistakes happen - but this one looks like a very fundamental one.

@czuvich
Copy link

czuvich commented Nov 15, 2019

The workaround I posted “fixed” it for me.

@thomasgalliker
Copy link

@czuvich thanks. I already have a bunch of custom renderers for such fixes...

@ChaseFlorell
Copy link

ChaseFlorell commented Nov 19, 2019

can't roll back, just sold the business on the new CollectionView, and it wasn't quite right in 4.2 😆.
@czuvich if you've been able to successfully resolve this within the renderer, how would you feel about submitting a PR? I'm sure it'd be welcomed by the Forms team.

@czuvich
Copy link

czuvich commented Nov 19, 2019

@ChaseFlorell It's just a temporary "hack". They will likely fix it differently. I'm not an Android expert :)

@nkuznetsov
Copy link

Things breaking here and there after upgrading to newer version of Forms has been a tradition since the beginning.

Here's a fast fix that worked for me - it was suggested elsewhere (can't remember the ticket #). This is for those who already have a thousand renderers fixing other things and don't want to add another. Add the following to manifest (in the application tag):

android:supportsRtl="true"

@acaliaro
Copy link
Author

Things breaking here and there after upgrading to newer version of Forms has been a tradition since the beginning.
Here's a fast fix that worked for me - it was suggested elsewhere (can't remember the ticket #). This is for those who already have a thousand renderers fixing other things and don't want to add another. Add the following to manifest (in the application tag):
android:supportsRtl="true"

Realy?

@veringm
Copy link

veringm commented Nov 20, 2019

As suggested by @nkuznetsov, android:supportsRtl="true" work for me

@gceaser
Copy link

gceaser commented Dec 3, 2019

Yeah the manifest update fixed it for me also:

@stoff99
Copy link

stoff99 commented Dec 4, 2019

Same issue here. Is there a plan to solve it in a Form bugfix version or do we rly need to make some dirty workaround fixes like android:supportsRtl="true" ?

@akamud
Copy link
Contributor

akamud commented Dec 5, 2019

This has a 4.3 release label but I don't see any PR linked. Is this actually being fixed?

@ghost
Copy link

ghost commented Dec 10, 2019

Works to me with android:supportsRtl="true" workaround.

@AdrianoRochedo
Copy link

AdrianoRochedo commented Dec 10, 2019 via email

@hartez
Copy link
Contributor

hartez commented Dec 10, 2019

This is fixed by #8658 and should be in an upcoming service release for 4.3.

@thomasgalliker
Copy link

@hartez are you sure it's in 4.3? The bug still appears to be present in 4.4.0.991265.

@hartez
Copy link
Contributor

hartez commented Dec 18, 2019

@hartez are you sure it's in 4.3? The bug still appears to be present in 4.4.0.991265.

Yes. The change was merged into the 4.3 branch 8 days ago and the 4.4 branch 6 days ago. 4.4.0.991265 was pushed to NuGet 7 days ago, so if the changes were in that version we'd have bigger problems than text alignment :)

The changes didn't make the last service release for 4.3; they should be in the next one. And an upcoming service release for 4.4.

@stavroaudi
Copy link

I'm on 4.4.0.991265 and the bug is still present. I'm still using the supportsRtl workaround in the meantime.

@samhouts samhouts added the 4.3.0 regression on 4.3.0 label Jan 3, 2020
@samhouts samhouts removed this from the 4.3.0 milestone Jan 3, 2020
@abhibl
Copy link

abhibl commented Jan 10, 2020

Add the following to manifest (in the application tag):
android:supportsRtl="true"

@thomasgalliker
Copy link

Hooray! It seems to be solved in Xamarin.Forms 4.4.0.991537 👍

@samhouts
Copy link
Member

samhouts commented Feb 4, 2020

huzzah!! closed by #8658

@samhouts samhouts closed this as completed Feb 4, 2020
@ousspero
Copy link

ousspero commented Feb 5, 2020

closed 18 hours ago, so i have to update now !, i hope this will not impacts the other features

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

No branches or pull requests