B Bryan Member Licensed User Longtime User Oct 29, 2015 #1 I run my app that was created with B4A on two hardware devices. One is a Samsung Galaxy S5 and the other is a Samsung Note 8. Both devices use capacitive touch menu buttons. I noticed on my Note 8 that when I run my app on it I will need to press the menu button 2 times before the menu will show. On my S5 it works normally with just one press or touch. I don't see this happening using other applications on my Note 8. I don't know what to think of this if it is hardware related (the device itself) or my code causing this for some reason on the note 8. Anyone seen something like this on their devices where you have to press the menu button twice to bring up the menu?
I run my app that was created with B4A on two hardware devices. One is a Samsung Galaxy S5 and the other is a Samsung Note 8. Both devices use capacitive touch menu buttons. I noticed on my Note 8 that when I run my app on it I will need to press the menu button 2 times before the menu will show. On my S5 it works normally with just one press or touch. I don't see this happening using other applications on my Note 8. I don't know what to think of this if it is hardware related (the device itself) or my code causing this for some reason on the note 8. Anyone seen something like this on their devices where you have to press the menu button twice to bring up the menu?
Erel B4X founder Staff member Licensed User Longtime User Oct 29, 2015 #2 Are you doing something special with the menu? Upvote 0
B Bryan Member Licensed User Longtime User Oct 30, 2015 #3 I'm not doing anything special with the menu. It's as simple as can be. I think I might know what could be causing the problem. I'm not sure how to handle it though. What I think may be causing a problem could be a Sub I have. Code: Sub Activity_KeyPress (KeyCode As Int) As Boolean 'return true if you want to consume the event If MyMsgBox.Visable Then MyMsgBox.Close_Box Return True End If End Sub I notice the problem specifically after I display a message box and then close it. The 3 dot menu does not respond on the first click or touch. After the second click it will open the menu. I am wondering if Activity_Keypress is affecting it somehow. The reason for using Activity_Keypress with Msgbox is because I had problems that if a user opened a message box and then didn't click cancel or OK and did something else like click the on the menu then the Msgbox would get stuck on the screen and no matter what I did it would not close If you clicked on OK or Cancel buttons. So to prevent that from happening I use Activity_KeyPress to force close the msgbox automatically if the user does not close it before clicking on the 3 dot menu (button?). Would this be the right way to do this? It seems to work fine on my one device Galaxy s5(lollypop) but not on the note 8(Kitkat). I'm still not sure this sub is causing the problem but it might have something to do with it. I do a lot of testing of my app to try and make it fail in someway (find bugs). The problem with the msgbox was something I found if the user doesn't close it and tries to open the menu. Last edited: Oct 30, 2015 Upvote 0
I'm not doing anything special with the menu. It's as simple as can be. I think I might know what could be causing the problem. I'm not sure how to handle it though. What I think may be causing a problem could be a Sub I have. Code: Sub Activity_KeyPress (KeyCode As Int) As Boolean 'return true if you want to consume the event If MyMsgBox.Visable Then MyMsgBox.Close_Box Return True End If End Sub I notice the problem specifically after I display a message box and then close it. The 3 dot menu does not respond on the first click or touch. After the second click it will open the menu. I am wondering if Activity_Keypress is affecting it somehow. The reason for using Activity_Keypress with Msgbox is because I had problems that if a user opened a message box and then didn't click cancel or OK and did something else like click the on the menu then the Msgbox would get stuck on the screen and no matter what I did it would not close If you clicked on OK or Cancel buttons. So to prevent that from happening I use Activity_KeyPress to force close the msgbox automatically if the user does not close it before clicking on the 3 dot menu (button?). Would this be the right way to do this? It seems to work fine on my one device Galaxy s5(lollypop) but not on the note 8(Kitkat). I'm still not sure this sub is causing the problem but it might have something to do with it. I do a lot of testing of my app to try and make it fail in someway (find bugs). The problem with the msgbox was something I found if the user doesn't close it and tries to open the menu.
Erel B4X founder Staff member Licensed User Longtime User Nov 1, 2015 #4 You should return False from this sub if you want the menu button to open the menu. Upvote 0
B Bryan Member Licensed User Longtime User Nov 2, 2015 #5 Thanks, That fixed the problem. Much appreciated. Upvote 0