Android Question Transparent panel

rossati

Active Member
Licensed User
Longtime User
Why a transparent panel does not inhibit the view below?

Thannks

John Rossati
 

sorex

Expert
Licensed User
Longtime User
it's a general setting on the device.

on my phone it's under settings > sound > touch sounds
 
Upvote 0

rossati

Active Member
Licensed User
Longtime User
Thanks Klaus
As you can have guessed I am being to make a modal input, it works with click event;
with the touch event, if I touch, on ending the "modal" the program crash.

John Rossati
 
Upvote 0

rossati

Active Member
Licensed User
Longtime User
I apologize: I believe the crash was due to my mistake: the sub who ran the touch event was declared without operands.
John Rossati
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
To be precise, adding a transparent Panel is NOT a modal input!
You need to process the user input yourself after the end of the routine where you call the Panel.
In a real modal input, like the Dialogs library, the process is interupted waiting for the user input in the calling routine.
 
Upvote 0

rossati

Active Member
Licensed User
Longtime User
Thanks
I think I did what you suggest; I am attaching the app if you can help someone.
this feature will be added to my form generator, freely downloadable from the website: www.condorinformatique.com.

John Rossati
 

Attachments

  • Dialog.zip
    7.3 KB · Views: 281
Upvote 0

klaus

Expert
Licensed User
Longtime User
I had a look at your code, it works, but I have following comments:

- You should not stop the main thread with:
Do While Not(ready)
DoEvents
Loop


- You should not use the same name, InputBox in this case, for a View added in the Designer and another in the code.
You have a warning about this in the Logs Tab. The same with btn.

- I wouldn't create the Dialog in the code each time when the function is called and remove evrything when you leave it.
I would add a layout in the Designer and use the Visible property.

Your code works like a modal dialog but blocks the main thread as long as the dialog is displayed, which is not recomended.

Attached you find a modified version of your code with my vision.
It's not 'modal' and doesn't block the main thread.
And finaly, I would make a CustomView.
 

Attachments

  • marco1.zip
    8.3 KB · Views: 203
Upvote 0

rossati

Active Member
Licensed User
Longtime User
Thanks
Marco app is only a container for try a Dialog function, I agree that is not the best to stp the main thread but it is the behavior that I wanted, that is a function returning a value.
I added Dialog to my form (de)generator.
A CustomView is a good idea.
Attached Formgen.

Best regards

John Rossati

(Marco1 doesn't works becaus I aheve not yet update B4.)
 

Attachments

  • formgen.zip
    311.9 KB · Views: 228
Upvote 0

rossati

Active Member
Licensed User
Longtime User
Yes I see your suggestions; I have B4A V 6.31, and when I try to open the layout I receive an error unknown: 12.
 
Upvote 0
Top