CustomDialogs problem with B4A V2.2-V2.3

Steven Bacchioni

Member
Licensed User
Longtime User
Installed B4A Version 2.20 a few minutes ago and have a problem with custom dialogs.

Basically I have a customdialog with a panel containing an EditText called (x) and a ListView called (ListView1).

In the version 2.02 of B4A the ItemClick event is triggered when an item was tapped in the ListView1 while the customdialog was displayed and had focus.

Sub ListView1_ItemClick (Position as Int, Value as String)
x.text = Value.text
End Sub

However, in the versions 2.20 / 2.22 and now 2.30 the ItemClick event only gets called when the dialog is closed.

Please note that listviews that are not part of a customdialog work correctly.

Any Ideas?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
The way that UI events are managed was changed in Android 4.04. This require a corresponding change in Basic4android libraries (otherwise it would have caused errors in some cases).

The consequence is that you cannot handle a UI event when a modal dialog is displayed.

I recommend you to use a non-modal dialog instead.
 
Upvote 0

Steven Bacchioni

Member
Licensed User
Longtime User
Thanks for the info.

I thought as much, so I have replaced the Listview to a Spinner which does not require external events to the customdialog.
 
Upvote 0
Top