Forum Xamarin.Android

How to force Arabic text to the left

RonNYCRonNYC Member ✭✭✭

I have a dialog box which displays a list of languages like this:

    var dialogView = LayoutInflater.Inflate(Resource.Layout.list_view, null);
    Android.App.AlertDialog alertDialog;

    listview = dialogView.FindViewById<ListView>(Resource.Id.listview);

    var items = new string[] { "English", "español", "中文(s)", "中文(t)", "日本語", "हिन्दी", 
    "français", "Deutsche", "русский", "عربى" };
    //  var adapter = new ArrayAdapter<string>(this, Android.Resource.Layout.SimpleListItem1, 
    var adapter = new ArrayAdapter<string>(this, Resource.Layout.list_item, items);

But when this is displayed, all the items are flush left except the last one (which is "Arabic" in arabic).

Is there a way to force it to the left?



Best Answer


  • RonNYCRonNYC Member ✭✭✭
    edited March 30


    That worked!!! Now, I need to find out if the Arabic text I put in the app, which is now flush left, makes sense to Arabic-speakers. I have no idea.

Sign In or Register to comment.