BetterSliding Panels Glitch?

Scantech

Well-Known Member
Licensed User
Longtime User
Please download the attachment and can anyone explain why the slider panel does not behave normal when msgbox is included in the Activity_Create. Happens when adding msgbox after ChangePanel(0). Panel is not shown.

Also, Adding the msgbox at the beginning of Activity_Create has issues when msgbox appears and home key is pressed. Go back to the app and you get blank.
 

Attachments

  • BetterSliderTest.zip
    14 KB · Views: 208
Last edited:

GaryOCO

Member
Licensed User
Longtime User
If you move the call to MsgBox to before the call to ChangePanel(0) everything works fine.

I'm no expert but I would suggest that, with your code the way it is, you start the animation when you make the call to ChangePanel and then the message box call comes imediately after and stops the animation just as it is starting. The problem is that the message box is modal which means that it stops everything in its tracks and will cause both the problems you mention. Calling the message box prior to the call to ChangePanel(0) avoids this problem.

It seems a little odd to put up a message box that offers an 'Ok' button and then hit the 'Home' key anyway, but many a strange thing has been done by users before.

In fact, if you had added the msgbox at the beginning of Activity_Create and then pressed the 'Ok' button on the msgbox rather than the home key, you would have had not experienced any problems.

If you really want to use a msgbox in such a strange place and you want to avoid all those problems, I suggest you use a non-modal 'Toast' message. Check it out here http://www.b4x.com/android/forum/threads/class-custom-toast-messages.18926/
 
Upvote 0
Top