dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.24k stars 1.76k forks source link

[Android] Picker dialog button layout direction #14367

Open hartez opened 1 year ago

hartez commented 1 year ago

PR #13672 took care of most of the RTL issues for the Android Picker dialog; however, we still have cases where the button placement on the dialog will be incorrect based on the FlowDirection settings the user has provided.

The Material styles/layouts for the Dialog control on Android utilize the "locale" setting for their LayoutDirection. If an application is running in an LTR locale and the application specifies an RTL FlowDirection for the Picker, most of the dialog's controls/text will honor the RTL FlowDirection, but the buttons (e.g. "Cancel") will default to the LTR locale.

To handle this, we will need some way of controlling the LayoutDirection setting for the button layout in a dialog. This probably means a custom XML layout which creates a settable attribute for the button layout. Alternatively, we might be able to simply create a custom layout with the LayoutDirection set to "inherit".

ghost commented 1 year ago

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

jinxinjuan commented 1 year ago

Verified this issue with Visual Studio Enterprise 17.7.0 Preview 4.0(net8). Can repro on Android platform.