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: 559
  • ahaActionbarexample.zip
    32.4 KB · Views: 662
  • Screenshot1.png
    Screenshot1.png
    15.4 KB · Views: 2,231
  • Screenshot2.png
    Screenshot2.png
    26.3 KB · Views: 1,548
  • Screenshot3.png
    Screenshot3.png
    24.3 KB · Views: 1,172
  • ahaActionBar.zip
    23.9 KB · Views: 807
  • ahaActionBar_Source.zip
    56.8 KB · Views: 712
Last edited:

b4auser1

Well-Known Member
Licensed User
Longtime User
I get error while extracting ahaActionBar.xml from ahaActionBar.zip. ahaActionBar.jar is extracted without errors.
 

angel

Member
Licensed User
Longtime User
Attachment with library ahaActionBar
 

Attachments

  • ahaActionBar.zip
    23.4 KB · Views: 357

b4auser1

Well-Known Member
Licensed User
Longtime User
ActionBarExample.b4a: AB.CreateNavigationDrawer requires paramaters which are not supported in the example.
 

angel

Member
Licensed User
Longtime User
In the example I have if it works well
AB.CreateNavigationDrawer ("Main", Null)

First object refers to the Activity Module
Second be referred to if you have associated an event, if there is no event put Null
 

Attachments

  • ahaActionbarexample.zip
    385.3 KB · Views: 402

gidex

New Member
Licensed User
Longtime User
Hello !
Very nice job !!!!! :)

...but I've a small issue when I try to set the size of the navigation drawer (NDWidth), it's not working.

I've edited the setNDWidth sub in ahaActionBar class like this, and now, it work :):

B4X:
Public Sub setNDWidth (NDWidth As Int)
     mSideBarWidth = NDWidth
     pnlNavigationDrawer.Width = mSideBarWidth
     If pnlNavigationDrawer.Left <> 0 Then
          pnlNavigationDrawer.Left = - mSideBarWidth
          lsvNavigationDrawer.width = mSideBarWidth-1
     End If
End Sub

could you confirm ?
 

gdeppi

Member
Licensed User
Longtime User
Hi,

I need to access the ActionButton properties, in order to Hide, Disable or remove ActionButtons.

How I can do that ?

Rgds.
 

aaronk

Well-Known Member
Licensed User
Longtime User
Hi,
Noticed that it says this is a Beta. Just wondering is there now a release version that isn't a beta ?

I was hoping to create a menu like the following but don't want to use a beta..

screenshot2-png.18291
 

edgeryder1000

Member
Licensed User
Longtime User
Hi,
Noticed that it says this is a Beta. Just wondering is there now a release version that isn't a beta ?

I was hoping to create a menu like the following but don't want to use a beta..

screenshot2-png.18291
You can use a hidden spinner and activate it when the menu button is clicked if you want to do it yourself.
 
Top