B4A Library [BETA] [B4A Lib] AhaActionBar (Actionbar, Navigation Drawer + Menu)

Discussion in 'Additional libraries, classes and official updates' started by RiverRaid, Jul 7, 2013.

  1. RiverRaid

    RiverRaid Active Member Licensed User


    I wrote a small B4A Library that offers a simple ActionBar in conjunction with a NavigationDrawer. A Simple Menu is also included.

    o) Copy jar and xml to your Additinal Libraries folder
    o) Unzip the ahaActionbarexample.zip and have a look :)
    o) This lib needs animation and reflector library

    Attention: If you want to include the lib in your app, don't forget to copy the drawables (drawables.zip) into your Objects/res/drawables directory.
    Drawables for Light and Dark Theme are included.

    On this Screenshots are 2 ActionBars. The AB on the Top has as Parent the Activity, the AB below has a panel as parent:
    [​IMG] [​IMG] [​IMG]

    The example should be pretty self-explanatory :)

    Hope you like it!
    Btw: as its still beta, Bugs and wishes are welcome :)

    The Sliding mechanism of the Navigationdrawer is inspired by the Sliding Sidebar from Informatix

    Added new version, much smoother and many animations
    Sourcecode also added

    Attached Files:

    Last edited: Aug 3, 2013
  2. Peter Simpson

    Peter Simpson Expert Licensed User

    Very nice

    Excellent :)

    Cheers :sign0008:
    Last edited: Jul 12, 2013
  3. JakeBullet70

    JakeBullet70 Well-Known Member Licensed User

    Nice work!
  4. RiverRaid

    RiverRaid Active Member Licensed User

    Thank you :)

    I made huge changes in the last days (nearly a rewrite...) and will test it the next week to find any bugs. When its finished, i will release of course the sourcecode :)
  5. dealsmonkey

    dealsmonkey Active Member Licensed User

    Thanks for your effort, really great :sign0060:
  6. Penguin

    Penguin Member Licensed User

  7. gadgetmonster

    gadgetmonster Active Member Licensed User

    Hi and thanks for this library. Could you tell me if there is a minimum sdk to use this?
  8. tipallandgo

    tipallandgo Member Licensed User

    Hi! I just noticed that the animation of the navigation drawer icon on the upper-left seems to be in reverse. It should be fully displayed when the drawer is closed and half when the drawer is opened.

    Another thing, is this possible? I mean the highlight when the home button is clicked. What I noticed is that the title is also included when clicking the button instead of only the logo and the navigation drawer icon.


    Thanks for this great library by the way.

    Attached Files:

    Last edited: Aug 1, 2013
  9. edgeryder1000

    edgeryder1000 Member Licensed User

    Nice idea, this is something I think the b4a community really needs. However, your lib is jerky as anything and just kinda bad.. :(
    thanks though :)
  10. RiverRaid

    RiverRaid Active Member Licensed User


    Thats the reason for the Beta :) I tried to make it better the last weeks, but as Im now builing a house and thats very time-consuming (I didn't think that it would be *that* annoying...) I attached the unfinished & beta code.

    If you have time and are interested, it would be great if you could do it better (no sarcasm!)

    To be honest: My approach to writing an app is:
    1) the idea
    2) code it together so that the GUI works
    3) go through all the code and make it "correct"

    I now, i should skip number 2 and go direct to 3), but as coding is my hobby i would loose a third of the fun :p
    Last edited: Aug 3, 2013
    JakeBullet70 likes this.
  11. edgeryder1000

    edgeryder1000 Member Licensed User

    Sorry if I offended you, yes I know, it's beta. And that's cool that you're building your own house. I helped out my parents building our house, and yeah it was a pretty big project :)
    Our approaches to coding apps are pretty much the same, except I never seem to make it to number 3 lol.

    I did try to make my own custom version in one of my apps, which I posted here. Some parts are buggy, but the main functionality is there.

    About making something better, I have started working on a class for a nice (though not extremely flexible) actionbar that will hopefully work with corwin42's new wrapper for the official navigation drawer library. It might not get finished however since I am kinda busy with school and exams coming up soonish.

    Anyway, sorry I can't test your latest version since I only have a trial version of b4a at the moment (my free upgrades ran out :'[ ) and it says it's "too large" for the trial version. But don't stop working on this, it will probably end up better than anything I could make (if you have a good way to do the UP functionality of the actionbar, please tell me, I have no idea :)). And if you haven't already, you should check this out: corwin42's drawer

    Best wishes
  12. RiverRaid

    RiverRaid Active Member Licensed User

    No worries, wasn't received as offence :)

    Yepp, i really underestimated it. I bought a "Prefabricated house" (don't know the exact english word for it) and thought, it would be pretty easy since it's like "lego". No, it ist't .. there are 1000 things to do :confused:

    I already saw it, cool idea to use a hidden spinner as menu ;)

    What exactly do you mean with the UP functionality?

    I saw it already, but I like to do "my own things" whenever possible.;)

    One last thing:
    Did you look at it via j*-gu*, or could you tell me what was jerky in your opinion? (I really like to make a great lib (+source) when it's finished ;)
    PS: to show the "new" code, you can use notepad++ which is free

    Best regards,
  13. RiverRaid

    RiverRaid Active Member Licensed User

    Oh my god! :confused: you are right. I have read about 100 times over the documentation and reversed it :( Attached ist the new Beta and new source.
    Please cauton: its still far away to be finished so do not use it in production apps ;)

    Good idea! Will be implemented, but need a bit of time, sorry
  14. edgeryder1000

    edgeryder1000 Member Licensed User

    Basically how in apps you can press the icon at the top left and it takes you to the previous activity

    I can still look at your code in b4a, just not compile. I find it hard to understand other peoples code, so I can't tell you what's wrong with it sorry. Ask one of the experts :p What I meant by it being "jerky" is that if you pull the drawer slowly it very noticeably jumps in about 4dip increments, rather than smoothly.
  15. RiverRaid

    RiverRaid Active Member Licensed User

    Activity.finish :)

    Ah, ok :) Will try to change it
  16. RiverRaid

    RiverRaid Active Member Licensed User

    I changed it according to your wish :) The new library and sourcecode are attached in the first post.

    Try the new version, its now smooth as silk :p
  17. Penguin

    Penguin Member Licensed User

    For some reason I can't extract your ahaActionBar.zip archive. 7-Zip says: unsupported compression method. I have tried it with Windows Explorer and Winrar as well, but all methodes failed

    Sorry for my horrible english
    Greetings from Germany

    I used Zip repair (http://www.diskinternals.com/zip-repair/) to repair the file and it worked :)
    Last edited: Aug 3, 2013
  18. RiverRaid

    RiverRaid Active Member Licensed User


    I zipped it with Windows ;) Just tried it, no problems on my Tablet and PC?
    Grüße aus Österreich ;)
    ashimo likes this.
  19. thedesolatesoul

    thedesolatesoul Expert Licensed User

    Really useful lib, RiverRaid.
    The thing I found missing is how to remove action buttons later in run time.
    If I get the time, I might look at the source. Looks really useful, thanks for sharing.
  20. angel

    angel Member Licensed User

    Its possible add Label to separate by title different menu options
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice