Android Question [Solved] Add label to B4X PreferencesDialog

aeric

Expert
Licensed User
Longtime User
Can I add a simple label (non-editable) and assign a value with key (map) when calling showdialog?

I want to show an item when a user clicks on Delete button, it pops up a PrefDialog with title and label.
I am using PrefDialog to standardize the dialog instead of using Msgbox2Async.

I tried with AddSeparator but it grayed out and I can't set the value because it doesn't have a key.
 
Solution
I tried it just now. It allows to tap inside and open another dialog.
True. This dialog shows the full text.

You can update the separator item using its index:
B4X:
p.PrefItems.Get(7).As(B4XPrefItem).Title = "test"

You can also assign it a key using the index and later use this key to update the title.

Erel

B4X founder
Staff member
Licensed User
Longtime User
I tried it just now. It allows to tap inside and open another dialog.
True. This dialog shows the full text.

You can update the separator item using its index:
B4X:
p.PrefItems.Get(7).As(B4XPrefItem).Title = "test"

You can also assign it a key using the index and later use this key to update the title.
 
Upvote 0
Solution

aeric

Expert
Licensed User
Longtime User
True. This dialog shows the full text.

You can update the separator item using its index:
B4X:
p.PrefItems.Get(7).As(B4XPrefItem).Title = "test"

You can also assign it a key using the index and later use this key to update the title.
Thanks. I successfully get the title updated by using separator and set the background color to transparent.
 
Upvote 0
Top