B4A Library [Class] Drawer with ScrollView

It's been quite a while since I last posted something usefull...
So here's my first 2013 contribution to this community.

Drawer with ScrollView:

This class is based on the much apreciated help of Klaus on the SnapToPosition ScrollView issue.

The class is initialized with SDrawer.Initialize(Activity) and calls back a sub to the Main activity named DrawerClick passing the Buttons Tag, in this case as a Integer.
I have created as many Variables as I saw necessary, but there is obviously still space for improvement..

Hope you guys find it usefull.

Oh... It's free of charge, only credits due to Klaus and myself, if used in an actual app...
 

Attachments

  • DrawerWithScrollView.zip
    32.8 KB · Views: 496
  • drawer2.png
    drawer2.png
    92.8 KB · Views: 916
Last edited:

Informatix

Expert
Licensed User
Longtime User
It's me or it's very difficult to open your drawer in the demo? On my phone, there are just a few lines at the top of the screen and I have to click a lot of times until it opens (that doesn't work at all if I try to drag it to the bottom).
 

mcmanu

Active Member
Licensed User
Longtime User
Awesome

Very Awesome ;)
Is it possible to make it like the normal android status bar?
(not with click event but scrolling down or up with the finger)
 

Cableguy

Expert
Licensed User
Longtime User
@ informatix...

You can adjust the Top atribute of the Base panel. Dont forget to also change the animationsvalues accordingly.

@@mcmanu

Of course... use the touch event of the base panel or of the activity to detect the slide motion
 

Informatix

Expert
Licensed User
Longtime User
@ informatix...

You can adjust the Top atribute of the Base panel. Dont forget to also change the animationsvalues accordingly.

I said that to help you to improve your demo (you should have a bigger handle or extend the touch area that opens the "drawer"). The demo, to my eyes, is not convincing because it is hardly usable (and does what my own class does already for the "drawer" part, but it's another subject). A demo should make your class attractive on any device. But I'm maybe the only one to have problems with it...
 

Cableguy

Expert
Licensed User
Longtime User
I built this class for my own use and decided to share it exactly because there is room for improvements. ... it was not my intention to give away the fish but to provide a fishing rod and a pod fill of fishes...
In many ways my drawer is similar to yours but so is any other drawer as the concept is not changed...
My demo is part of my ongoing project and its being designed in two hi res devices so the sizing works for me...
 
Top