Articles in this section
Category / Section

How to load ListView items in RTL direction in Xamarin.Forms (SfListView)

1 min read

The Xamarin.Forms SfListView allows you to change the flow direction by setting the FlowDirection to RightToLeft. You can also refer the document from here.

Android

In the AndroidManifest.xml file, set the android:supportsRtl attribute to True.

<?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.ListViewRTL" android:installLocation="auto">
 <uses-sdk android:minSdkVersion="19" android:targetSdkVersion="28" />
 <application android:label="ListViewRTL.Android" android:supportsRtl="true"></application>
</manifest>

iOS

In the info.plist file, add the right-to-left locale as a required language to the CFBundleLocalizations key.

<key>CFBundleLocalizations</key>
<array>
 <string>en</string>
 <string>ar</string>
</array>

UWP

In the Package.appxmanifest file, add the required language.

<Resources>
  <Resource Language="x-generate"/>
  <Resource Language="en" />
  <Resource Language="ar" />
</Resources>

XAML

Set the FlowDirection of the SfListView to RightToLeft.

<sync:SfListView x:Name="listView" FlowDirection="RightToLeft" ItemsSource="{Binding PizzaInfo}"/>

View sample in GitHub

RTL Xamarin.Forms ListView

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied