1

I'm preparing sample project in MAUI and in my sample, i'm changing background of native view (ContentViewGroup) by setting MauiDrawable to it's background property.

var selectionBackground = new MauiDrawable(handler.NativeView.Context);
selectionBackground.SetBackground(mauiBrush);
handler.NativeView.Background = selectionBackground;

In RightToLeft direction, content direction is changed to LTR from RTL when setting backgroud at run time.

enter image description here

We tried below codes to resolve this, but not worked.

//handler.NativeView.UpdateFlowDirection(view);
 if (parent.FlowDirection == FlowDirection.RightToLeft)
 {
      handler.NativeView.LayoutDirection = Android.Views.LayoutDirection.Rtl;
 }

Please share your suggestion to keep that selected content in RTL.

Thanks.

0 Answers0