Android Question Buttons disappear in dialog.showcustom

scsjc

Well-Known Member
Licensed User
Longtime User
I have encountered the situation of a user that sometimes when the dialog.showcustom is loaded, the "accept, negative, cancel" buttons do not appear

I have tried many times and I never get it to happen, and neither has any user reported a similar problem to me.

What I have noticed is that if I leave the app in the background, with the dialog.showcustom loaded, for x time, the buttons do not disappear but sometimes they do not respond.

Part of the code I use to launch the dialogshowcustom is this example:


B4X:
Dim rs As ResumableSub = Dialog.ShowCustom(pnl, "acept", "negative", "cancel")
Dim dialogbutton_ok As B4XView = Dialog.GetButton(xui.DialogResponse_Positive)
        dialogbutton_ok.SetLayoutAnimated(0, (95%x/3)*2, dialogbutton_ok.Top, 95%x/3, dialogbutton_ok.HeiGHT)
Wait For (rs) Complete (res As Int)
...


This is the full screen with the buttons, and the screen that the user has reported to me


 

Erel

B4X founder
Staff member
Licensed User
Longtime User
I don't see any problem in your code.

What I have noticed is that if I leave the app in the background, with the dialog.showcustom loaded, for x time, the buttons do not disappear but sometimes they do not respond.
Maybe you are doing something in Activity_Resume that breaks the dialog?
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…