Android Question InputListAsync change font size

Mostez

Well-Known Member
Licensed User
Longtime User
Is it possible to change the font size of InputListAsync? if yes, how can I do that?
 

Mahares

Expert
Licensed User
Longtime User
Is it possible to change the font size of InputListAsync? if yes, how can I do that?
Have you tried the newer B4XListTemplate, where it is possible. Need XUI Views lib. See example:
B4X:
Private options As B4XListTemplate
   
    options.Initialize
    options.Options = Array("klaus", "manfred", "erel", "peter",  "mangojack", "johan", "makis")
    options.CustomListView1.DefaultTextColor = XUI.Color_Yellow
    Dim l As B4XView = options.CustomListView1.DesignerLabel
    l.Font =XUI.CreateDefaultFont(30)
 

Attachments

  • B4XListTemplate111520.png
    B4XListTemplate111520.png
    21.7 KB · Views: 185
Upvote 0

Mostez

Well-Known Member
Licensed User
Longtime User
ok, it works ok, but I have two questions about it, when I click an item, it exits the list at once,
1- how can I make it wait until user press OK or cancel, I don't need multi select, just want to let user make sure that he/she selected the desired item then press OK
2- how can I change size of list to 90%x and 90%y , i tried the resize method but it did not work, i tried %x %y but I've got empty space below scrollable items!
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
I don't need multi select
Add this line to only select one item:
B4X:
options.AllowMultiSelection = False
2- how can I change size of list to 90%x and 90%y
B4X:
options.Resize(90%x, 90%y)
or something like this:
B4X:
options.Resize(300dip, 500dip)
As far as the user pressing the ok before the selection is made, I have not had to use it that way, so at this point I am not sure. Someone else may help.
EDIT: I have a workaround for pressing the OK before final selection is made, I can run it by you if you or someone else have not come up with a better way
 
Last edited:
Upvote 0
Top