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

DisplayAlert Title not respecting FlowDirection #7065

Closed
jrahma opened this issue Aug 5, 2019 · 12 comments · Fixed by #11679
Closed

DisplayAlert Title not respecting FlowDirection #7065

jrahma opened this issue Aug 5, 2019 · 12 comments · Fixed by #11679
Labels
a/l10n a/rtl blocker Issue blocks next stable release. Prioritize fixing and reviewing this issue. e/3 🕒 3 in-progress This issue has an associated pull request that may resolve it! p/Android t/bug 🐛
Milestone

Comments

@jrahma
Copy link

jrahma commented Aug 5, 2019

Hi,

When I set the page to RightToLeft's FlowDirection the title of the DisplayAlert still going to the LeftToRight

Please see below screenshot...

Screenshot_20190805_062325

Thanks,
Jassim

@jrahma jrahma added s/unverified New report that has yet to be verified t/bug 🐛 labels Aug 5, 2019
@pauldipietro pauldipietro added this to New in Triage Aug 5, 2019
@jfversluis
Copy link
Member

I can't seem to reproduce this locally. Could you maybe specify what version of Android you are seeing this? Does this also happen on iOS?

If at all possible could you show some code or maybe even a small sample repro project?

Thanks!

@jfversluis jfversluis added a/l10n 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 Aug 5, 2019
@jfversluis jfversluis moved this from New to Needs Info in Triage Aug 5, 2019
@jrahma
Copy link
Author

jrahma commented Aug 5, 2019

it's weird! I created a new project and it shows it right but in my project it shows the title LTR..

And what is funny that it is ONLY the Title of the DisplayAlert not the content itself!

Although my new sample is just a copy paste from my existing code!

@jfversluis
Copy link
Member

Do you have any custom renderers in place? Anything else that might affect this behavior? I had to set the "is RTL supported" property in the AndroidManifest.xml, is that set?

@jrahma
Copy link
Author

jrahma commented Aug 6, 2019

Nope... No custom renderers

and the AndroidManifest has the RTL set

@jfversluis
Copy link
Member

Strange. Is it possible your repro project has a newer Forms version than the app that has the actual problem?

@jrahma
Copy link
Author

jrahma commented Aug 6, 2019

I Know, very strange! Nope, I have update Xamarin Forms on both to the latest

I have sent you a link with the app

Screenshot_20190806_130652_com jafaria official

@PureWeen
Copy link
Contributor

@jrahma I'm wondering if it's due to something in your AndroidManifest.xml

Do you have rtl set there?

<application android:label="AndroidControlGallery" android:supportsRtl="true">

Also do you have bot the min and target sdks set?

<uses-sdk android:minSdkVersion="17" android:targetSdkVersion="28" />

Try setting android:minSdkVersion to 17 if you have it at a lower value

@jrahma
Copy link
Author

jrahma commented Aug 17, 2019

here is my AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.companyname.alertrtl">
    <uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28" />
    <application android:label="AlertRTL.Android" android:supportsRtl="true"></application>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
</manifest>

and attached is a simple app with the problem:

I noticed this problem happens when I set:

android:supportsRtl="true"

so should I set it or not if I am working on a localized RTL app?

AlertRTL.zip

Thanks,
Jassim

@jfversluis
Copy link
Member

OK, this is really weird. The bug actually happens whenever you do set android:supportsRtl="true". I've taken your reproduction project and when I set android:supportsRtl="false" it suddenly shows up the right way. While you would expect it to be the other way around.

@jfversluis jfversluis added e/3 🕒 3 and 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. s/unverified New report that has yet to be verified labels Aug 19, 2019
@jfversluis jfversluis added this to To do in Android Ready For Work via automation Aug 19, 2019
@jfversluis jfversluis removed this from Needs Info in Triage Aug 19, 2019
@AbuSafi
Copy link

AbuSafi commented Mar 28, 2020

DisplayAlert and DisplayActionSheet orientation is controlled by the device locale, rather than the FlowDirection property.

Reference : https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/localization/right-to-left

@jrahma
Copy link
Author

jrahma commented Mar 28, 2020

I still believe this can and this should be fixed

@ahmedElsayedSmarttech
Copy link

this is still an issue, i am using xamarin forms 4.7

@samhouts samhouts added the in-progress This issue has an associated pull request that may resolve it! label Aug 17, 2020
@samhouts samhouts moved this from To do to In progress in Android Ready For Work Aug 17, 2020
@samhouts samhouts removed this from the 5.0.0 milestone Nov 2, 2020
@samhouts samhouts added this to In Progress in vNext+1 (5.0.0) Nov 3, 2020
@PureWeen PureWeen added this to To do in v5.0.1 via automation Nov 5, 2020
@PureWeen PureWeen removed this from In Progress in vNext+1 (5.0.0) Nov 5, 2020
@PureWeen PureWeen added this to To do in vNext+1 (5.0.0) via automation Nov 5, 2020
@PureWeen PureWeen removed this from To do in v5.0.1 Nov 5, 2020
@PureWeen PureWeen added this to the 5.0.0 milestone Nov 5, 2020
@rmarinho rmarinho added the blocker Issue blocks next stable release. Prioritize fixing and reviewing this issue. label Nov 16, 2020
@rmarinho rmarinho moved this from To do to Blockers in vNext+1 (5.0.0) Nov 16, 2020
@rmarinho rmarinho moved this from Blockers to In Progress in vNext+1 (5.0.0) Nov 27, 2020
Android Ready For Work automation moved this from In progress to Done Dec 3, 2020
vNext+1 (5.0.0) automation moved this from In Progress to Done Dec 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a/l10n a/rtl blocker Issue blocks next stable release. Prioritize fixing and reviewing this issue. e/3 🕒 3 in-progress This issue has an associated pull request that may resolve it! p/Android t/bug 🐛
Projects
Development

Successfully merging a pull request may close this issue.

7 participants