Jun 19, 2012 Replies: 49 This is a class that implements a sliding menu as seen in many apps like Google+, Evernote, Facebook etc. Requires B4A 2.0 or newer. Attachments SlideMenuClass_1_0.zip SlideMenuClass_1_0.zip 12.6 KB · Views: 5,684 screenshot-1340094419260.png 32.3 KB · Views: 7,137 Click to expand...
This is a class that implements a sliding menu as seen in many apps like Google+, Evernote, Facebook etc. Requires B4A 2.0 or newer.
Erel B4X founder Staff member Licensed User Longtime User Jun 19, 2012 #2 Great example of the new classes feature! Thank you for sharing.
B bluedude Well-Known Member Licensed User Longtime User Jun 19, 2012 #4 Tried to make it appear left or right but animation is not my strongest point Want to use it as a replacement for the Quick vertical menu together with the actionbar. That will probably solve my issues without the need for libraries. Could you add either left or right top?
Tried to make it appear left or right but animation is not my strongest point Want to use it as a replacement for the Quick vertical menu together with the actionbar. That will probably solve my issues without the need for libraries. Could you add either left or right top?
pluton Active Member Licensed User Longtime User Jun 20, 2012 #6 This is soooooo great. I love it I must learn class programming ASAP. This is fantastic. Thanks for sharing it.
This is soooooo great. I love it I must learn class programming ASAP. This is fantastic. Thanks for sharing it.
S salmander Active Member Licensed User Longtime User Jun 20, 2012 #7 Excellent work mate.... Just to let you know, there is a bug, if the keyboard is open, and you press the menu key, the SlideMenu behaves unexpectedly. It shows the menu, but no click event get registered.
Excellent work mate.... Just to let you know, there is a bug, if the keyboard is open, and you press the menu key, the SlideMenu behaves unexpectedly. It shows the menu, but no click event get registered.
M Merlot2309 Active Member Licensed User Longtime User Jun 20, 2012 #8 Hi Corwin, Thank you for this nice example. I will use it as a starting point for Classes. Regards, Helen.
Hi Corwin, Thank you for this nice example. I will use it as a starting point for Classes. Regards, Helen.
margret Well-Known Member Licensed User Longtime User Jun 20, 2012 #9 Just downloaded and ran this class. AWESOME!!! Very Nice:sign0098: Thanks:icon_clap:
corwin42 Expert Licensed User Longtime User Jun 22, 2012 #11 You can put a semitransparent panel behind the listview to create a shadow effect.
P PHB2 Member Licensed User Longtime User Jun 27, 2012 #12 Very nice indeed. It scrolls properly when a large number of items are added to it.
M mrB New Member Licensed User Longtime User Jul 15, 2012 #13 salmander said: Excellent work mate.... Just to let you know, there is a bug, if the keyboard is open, and you press the menu key, the SlideMenu behaves unexpectedly. It shows the menu, but no click event get registered. Click to expand... I had a similar problem. After three clicks the events stopped being registered. Just after Code: mBackPanel.BringToFront mSlidePanel.BringToFront I added Code: mListView.BringToFront That solved my problem. See line 81,82 in the class. Thanks for a great class!
salmander said: Excellent work mate.... Just to let you know, there is a bug, if the keyboard is open, and you press the menu key, the SlideMenu behaves unexpectedly. It shows the menu, but no click event get registered. Click to expand... I had a similar problem. After three clicks the events stopped being registered. Just after Code: mBackPanel.BringToFront mSlidePanel.BringToFront I added Code: mListView.BringToFront That solved my problem. See line 81,82 in the class. Thanks for a great class!
S salmander Active Member Licensed User Longtime User Jul 16, 2012 #15 mrB said: I had a similar problem. After three clicks the events stopped being registered. Just after Code: mBackPanel.BringToFront mSlidePanel.BringToFront I added Code: mListView.BringToFront That solved my problem. See line 81,82 in the class. Thanks for a great class! Click to expand... cheers mate. That did indeed solved the problem.
mrB said: I had a similar problem. After three clicks the events stopped being registered. Just after Code: mBackPanel.BringToFront mSlidePanel.BringToFront I added Code: mListView.BringToFront That solved my problem. See line 81,82 in the class. Thanks for a great class! Click to expand... cheers mate. That did indeed solved the problem.
JonPM Well-Known Member Licensed User Longtime User Aug 13, 2012 #16 Can someone confirm a bug for me? To reproduce: Set one of the Item's to start a separate activity Open Menu Select Item (opens new activity) Go back to first activity Open Menu On my device the menu will open and close really fast. I have to press menu once again in order to open and use it. I am assuming something needs to go in Activity_Resume, just not sure what exactly. Anyone?
Can someone confirm a bug for me? To reproduce: Set one of the Item's to start a separate activity Open Menu Select Item (opens new activity) Go back to first activity Open Menu On my device the menu will open and close really fast. I have to press menu once again in order to open and use it. I am assuming something needs to go in Activity_Resume, just not sure what exactly. Anyone?
JonPM Well-Known Member Licensed User Longtime User Aug 13, 2012 #17 JonPM said: Can someone confirm a bug for me? To reproduce: Set one of the Item's to start a separate activity Open Menu Select Item (opens new activity) Go back to first activity Open Menu On my device the menu will open and close really fast. I have to press menu once again in order to open and use it. I am assuming something needs to go in Activity_Resume, just not sure what exactly. Anyone? Click to expand... Ahh, I seemed to have found the problem. sm.IsVisible doesn't get set to false when opening a new activity. This is my temp fix until someone can comment on this: In SlideMenu class add: Code: Public Sub SetVisible (Visible As Boolean) mSlidePanel.Visible = Visible End Sub In main activity, under Activity_Pause add: Code: sm.SetVisible(False) This does the trick, but maybe someone has a better way?
JonPM said: Can someone confirm a bug for me? To reproduce: Set one of the Item's to start a separate activity Open Menu Select Item (opens new activity) Go back to first activity Open Menu On my device the menu will open and close really fast. I have to press menu once again in order to open and use it. I am assuming something needs to go in Activity_Resume, just not sure what exactly. Anyone? Click to expand... Ahh, I seemed to have found the problem. sm.IsVisible doesn't get set to false when opening a new activity. This is my temp fix until someone can comment on this: In SlideMenu class add: Code: Public Sub SetVisible (Visible As Boolean) mSlidePanel.Visible = Visible End Sub In main activity, under Activity_Pause add: Code: sm.SetVisible(False) This does the trick, but maybe someone has a better way?
Yafuhenk Active Member Licensed User Longtime User Sep 14, 2012 #18 Hi I like the slide menu so I included it in my app. However the software crashes now. I included the code that JonPM suggested. To get an crash do the following: - download slidemenucrash.zip - start app - open the menu - slowly (!!) press on the Screenshot - or About & Help item The strange thing is that when you click the item very fast it all goes well. Can some one help me here? Thanks Henk
Hi I like the slide menu so I included it in my app. However the software crashes now. I included the code that JonPM suggested. To get an crash do the following: - download slidemenucrash.zip - start app - open the menu - slowly (!!) press on the Screenshot - or About & Help item The strange thing is that when you click the item very fast it all goes well. Can some one help me here? Thanks Henk
Informatix Expert Licensed User Longtime User Sep 14, 2012 #19 YAFUHENK said: Hi I like the slide menu so I included it in my app. However the software crashes now. I included the code that JonPM suggested. To get an crash do the following: - download slidemenucrash.zip - start app - open the menu - slowly (!!) press on the Screenshot - or About & Help item The strange thing is that when you click the item very fast it all goes well. Click to expand... I get no crash with the About & Help item. The width of you slide menu is not enough for my screen (854x480). You should define it in dips instead of %.
YAFUHENK said: Hi I like the slide menu so I included it in my app. However the software crashes now. I included the code that JonPM suggested. To get an crash do the following: - download slidemenucrash.zip - start app - open the menu - slowly (!!) press on the Screenshot - or About & Help item The strange thing is that when you click the item very fast it all goes well. Click to expand... I get no crash with the About & Help item. The width of you slide menu is not enough for my screen (854x480). You should define it in dips instead of %.
Yafuhenk Active Member Licensed User Longtime User Sep 14, 2012 #20 Informatx, touch the help & about item for about 1 second. What happens then? Henk