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

Hi!

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

Usage
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:
attachment.php
18291d1373215622-beta-b4a-lib-ahaactionbar-actionbar-navigation-drawer-menu-screenshot2.png
18292d1373215626-beta-b4a-lib-ahaactionbar-actionbar-navigation-drawer-menu-screenshot3.png


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
 

Attachments

  • drawables.zip
    9.6 KB · Views: 557
  • ahaActionbarexample.zip
    32.4 KB · Views: 661
  • Screenshot1.png
    Screenshot1.png
    15.4 KB · Views: 2,229
  • Screenshot2.png
    Screenshot2.png
    26.3 KB · Views: 1,547
  • Screenshot3.png
    Screenshot3.png
    24.3 KB · Views: 1,171
  • ahaActionBar.zip
    23.9 KB · Views: 805
  • ahaActionBar_Source.zip
    56.8 KB · Views: 710
Last edited:

RiverRaid

Active Member
Licensed User
Longtime 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 :)
 

dealsmonkey

Active Member
Licensed User
Longtime 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 :)

Thanks for your effort, really great :sign0060:
 

tipallandgo

Member
Licensed User
Longtime 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.

screenshot_2013-08-01-17-09-45-png.18710


Thanks for this great library by the way.
 

Attachments

  • Screenshot_2013-08-01-17-09-45.png
    Screenshot_2013-08-01-17-09-45.png
    71.7 KB · Views: 1,733
Last edited:

RiverRaid

Active Member
Licensed User
Longtime User
Hi!

However, your lib is jerky as anything and just kinda bad.. :(
thanks though :)

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:

edgeryder1000

Member
Licensed User
Longtime 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
 

RiverRaid

Active Member
Licensed User
Longtime User
Sorry if I offended you, yes I know, it's beta.
No worries, wasn't received as offence :)


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 :)
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 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.
I already saw it, cool idea to use a hidden spinner as menu ;)

(if you have a good way to do the UP functionality of the actionbar, please tell me, I have no idea :)).
What exactly do you mean with the UP functionality?

And if you haven't already, you should check this out: corwin42's drawer
I saw it already, but I like to do "my own things" whenever possible.;)

One last thing:
However, your lib is jerky as anything and just kinda bad
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,
Andi
 

RiverRaid

Active Member
Licensed User
Longtime 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.
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 ;)

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.

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

edgeryder1000

Member
Licensed User
Longtime User
What exactly do you mean with the UP functionality?
Basically how in apps you can press the icon at the top left and it takes you to the previous activity

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
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.
 

RiverRaid

Active Member
Licensed User
Longtime User
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.

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

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.

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

Penguin

Member
Licensed User
Longtime 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

EDIT:
I used Zip repair (http://www.diskinternals.com/zip-repair/) to repair the file and it worked :)
 
Last edited:

RiverRaid

Active Member
Licensed User
Longtime User
Hi!

I zipped it with Windows ;) Just tried it, no problems on my Tablet and PC?
Grüße aus Österreich ;)
 
Top