I want to improve on user experience and UI a bit more in my app. Right now all I do is use a simple MsgBox to show messages.
I want to add popups for certain things, like errors, success, etc.
What is the best way to do it without making the code confusing or messy?
Here are some ways I thought of, and tried out, but not sure.
1. Have 1 "popupPanel" that is declared in Class_Globals.
* When I need to show a popup, add the panel to Root
* Load the layout for the popup, depending on what kind of popup (error, success, etc)
* Update/Set the icons and text on the popup
* When popup is closed, remove all views
2. Use Alex's Library (https://www.b4x.com/android/forum/threads/b4x-as-floatingpanel.141754/#content)
* Similar to option 1 but most of the logic is already handled
3? 4?
I want to add popups for certain things, like errors, success, etc.
What is the best way to do it without making the code confusing or messy?
Here are some ways I thought of, and tried out, but not sure.
1. Have 1 "popupPanel" that is declared in Class_Globals.
* When I need to show a popup, add the panel to Root
* Load the layout for the popup, depending on what kind of popup (error, success, etc)
* Update/Set the icons and text on the popup
* When popup is closed, remove all views
2. Use Alex's Library (https://www.b4x.com/android/forum/threads/b4x-as-floatingpanel.141754/#content)
* Similar to option 1 but most of the logic is already handled
3? 4?