'Flyout Page with "split" FlyoutLayoutBehavior + Right-to-Left in Xamarin.Forms V5

Description

I'm trying to apply RTL direction on the Flyout page with split behavior , it works correctly on IOS(master page on the right ) .But in the android It stays on the left side. Any ideas or could somebody help me with custom renderer?

I used Different solution without any result like below :

1- add android:supportsRtl="true" to AndroidManifest.xml

2- add FlowDirection = FlowDirection.RightToLeft in the constructor of the Flyout page

3- add Window.DecorView.LayoutDirection = LayoutDirection.Rtl; in the MainActivity File

Steps to Reproduce

use Xamarin forms version 5

create flyout page and apply the above solutions

Deploy the app in android device or emulator

Expected Behavior the master page should appear in the right side

Actual Behavior the master page it is still appear in the left side

FLayout RTL issue



Solution 1:[1]

To display the FlyoutPage on the right side, please set FlowDirection to RightToLeft for the flyoutPage.

So, you can add code FlowDirection="RightToLeft" to your FlyoutPage1.xaml

<?xml version="1.0" encoding="utf-8" ?>
<FlyoutPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="POCXamarinForm.FlyoutPage1"
             FlowDirection="RightToLeft"
             xmlns:pages="clr-namespace:POCXamarinForm">
  <FlyoutPage.Flyout>
    <pages:FlyoutPage1Flyout x:Name="FlyoutPage" />
  </FlyoutPage.Flyout>
  <FlyoutPage.Detail>
    <NavigationPage>
      <x:Arguments>
        <pages:FlyoutPage1Detail />
      </x:Arguments>
    </NavigationPage>
  </FlyoutPage.Detail>
</FlyoutPage>

For more,you can check: https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/localization/right-to-left .

Solution 2:[2]

To display flyout page on right side, try adding the following code in the constructor of FlyoutPage1.xaml.cs

this.FlowDirection = FlowDirection.RightToLeft;
Flyout.FlowDirection = FlowDirection.RightToLeft;
Detail.FlowDirection = FlowDirection.RightToLeft;

enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jessie Zhang -MSFT
Solution 2 Sugitha