Android Question B4XPreferencesDialog Items Alignment Right to Left

Saeed Qatari

Member
Licensed User
Greetings,
Appreciate any support related to B4XPreferencesDialog as I need the items to be listed within the dialog from right to left. The default, items are listed from left to right.

Thank you in advance.
 
I need the items to be listed within the dialog from right to left
Ya Saeed, something like this:
Code: Copy
Dim sf As Object = prefdialog.ShowDialog(Data, "OK", "CANCEL")
        For i = 0 To prefdialog.PrefItems.Size - 1
            Dim pi As B4XPrefItem = prefdialog.PrefItems.Get(i)
            If pi.ItemType = prefdialog.TYPE_TEXT Then
                Dim ft As B4XFloatTextField = prefdialog.CustomListView1.GetPanel(i).GetView(0).Tag
                ft.TextField.SetTextAlignment("CENTER", "RIGHT")
            End If
        Next
    Wait For (sf) Complete (Result As Int)
 
Upvote 0
Thank you Mahares for quick reply. I have done below code as per your recommendation and the app get freeze when I run below code.

B4X: Copy
    prefdialog7.Title = devDetailsTxt
    prefdialog7.CustomListView1.AddTextItem("devId",devNameTxt)
    prefdialog7.CustomListView1.AddTextItem("devNumber",devNumberTxt)
    prefdialog7.CustomListView1.AddTextItem("devPin",devPassTxt)
    prefdialog7.GetPrefItem("devId").Required = True
    prefdialog7.GetPrefItem("devNumber").Required = True
    prefdialog7.GetPrefItem("devPin").Required = True
    Dim devData As Map = CreateMap("devId": devName, "devNumber": devAdd, "devPin": devPass)
    Dim dialog1 As Object = prefdialog7.ShowDialog(devData, okstr, canstr)
    For i = 0 To prefdialog7.PrefItems.Size - 1
    Dim pi As B4XPrefItem = prefdialog7.PrefItems.Get(i)
    If pi.ItemType = prefdialog7.TYPE_TEXT Then
    Dim ft As B4XFloatTextField = prefdialog7.CustomListView1.GetPanel(i).GetView(0).Tag
    ft.TextField.SetTextAlignment("CENTER", "RIGHT")
    End If
    Next
    Wait For (dialog1) Complete (Result As Int)
 
Upvote 0
An update, it is working now but with following issues:
  1. Hint Text is in the left and it should be on the right
  2. The delete and verification symbols are on the right which should be on the left or removed
Appreciate any support to resolve these.

Thank you;
 
Upvote 0
Upvote 0
Back
Top