Search code examples
xamarin.formsxamarin.android

MasterDetailPage xamarin.forms flow direction right to left not working on Android


I Have a MasterDetailPage on Xamarin.Forms and I switched the flow direction to RightToLeft. It works as expected on UWP and iOS but not on Android. Anyone knows why? On Android it still showing as LeftToRight...


Solution

  • According to Xamarin Documentation Here you should set supportsRtl to true in the application manifest in android project

    android:supportsRtl="true"
    

    and if you want to enforce supporting RTL without changing device language you should add this code to your MainActivity.cs in "OnCreate" Method

    Window.DecorView.LayoutDirection = LayoutDirection.Rtl;