Sorry to ask my question at the wrong place.
The solutions I found, were for EditText. With Preferences dialogs we access data from/to a map collection. So how we can't do something like:
"EditText.InputType = Bit.Or(EditText.InputType, 524288)"
Try this code where you expose the native text view of B4XFloatTextField:
B4X:
For i = 0To prefdialog.PrefItems.Size - 1Dim pi As B4XPrefItem = prefdialog.PrefItems.Get(i)
If pi.ItemType = prefdialog.TYPE_TEXT ThenDim ft As B4XFloatTextField = prefdialog.CustomListView1.GetPanel(i).GetView(0).Tag
Dim et As EditText= ft.TextField 'expose native text view
et.InputType = Bit.Or(et.InputType, 144) 'this one works on my samsung tablet' et.InputType = Bit.Or(et.InputType, 524288) 'or this one if above number does not do it EndIfNext
Thanks but It does not work. I get an abend (java.lang.IndexOutOfBoundsException: Index: 0, Size: 0) on line:
Dim ft As B4XFloatTextField = prefDialog.CustomListView1.GetPanel(i).GetView(0).Tag
when I run it with debugging.
It worked for me. I did not post it until I verified it worked for me. You may have to try different views . I have GetView(0), yours may be GetView(1) or something else. If not, someone will come to your rescue.
Finally, I found what it happend:
your routine should be placed after the "wait..." and not before:
B4X:
WaitFor (prefDialog.ShowDialog(ResultMap, "OK", "CANCEL")) Complete (Result As Int)
For i = 0To prefDialog.PrefItems.Size - 1
...
NextIf Result = xui.DialogResponse_Positive Then ....
and initialization should be done in "activity create" of activity.
Thanks for your help !...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.