B4A Library AHNavigationDrawer - Native Google Navigation Drawer

This is a wrapper library for the native NavigationDrawer introduced by Google at Google I/O 2013.

It contains two objects:

AHNavigationDrawer - This implements the Navigation Drawer
SlideDrawable - This is a special type of drawable used to create an indicator for the NavigationDrawer
MaterialMenuDrawable - This is a drawable which can be used to create the Material Design burger->arrow->cross->check animation.

This Library uses the android-support-v4.jar library which is part of the Android SDK. You have to install it with the Android SDK Manager. In the SDK Manager please add/download the "Extras/Android Support" package. Then you will need to copy the android-support-v4.jar file from <SDK root folder>\extras\android\support\v4 to your B4A custom libs folder!
You need at least the API17 version of the library!

The MaterialMenuDrawable uses the NineOldAndroid animation library. Download the nineoldandroids-2.4.0.jar from here and place it in your custom libs folder (you don't need an xml file for it)

The example uses the mListView library by icefairy333 and the reflection library by agraham.

Changelog:
V1.0:
- Initial version

V1.1:
WARNING: Signature of the event subs have changed!
- Added support for secondary drawer
- Ability to change drawer edge touch sensitivity size

V1.20:
- Fixed the "glitch" while opening the drawer (Sometimes the drawer got "stuck" while swiping open)

V1.21:
- Fixed bug when using NavDrawer.ContentPanel.LoadLayout()

V1.30:
- Some internal changes which should make it compatible with ULV (Ultimate ListView)
- New MaterialMenuDrawable object for Material Design Burger/Arrow/Cross/Check animation
Attention: The MaterialMenuDrawable needs the NineOldAndroids library. See above.

V1.40:
- changed typo for nineoldandroids jar file (Name change: nineoldandroid-2.4.0.jar to nineoldandroids-2.4.0.jar). If you update from older version just change nineoldandroid-2.4.0.jar in your CustomLibs folder to nineoldandroids-2.4.0.jar

Screenshot_2013-08-01-09-49-05.png
 

Attachments

  • AHNavigationDrawerExample1_1.zip
    323.7 KB · Views: 3,459
  • DoubleNavigationDrawerExample1_0.zip
    324 KB · Views: 2,563
  • AHNavigationDrawer1_40.zip
    27.8 KB · Views: 2,248
Last edited:

corwin42

Expert
Licensed User
Longtime User
Is it possible use of two NavDrawer the left and right? I would like in some moments of the program that was NavDraver on the right side of the other options. It is possible?
Yes. You can add a Socondary drawer.
 

skill27

Member
[QUOTE = "ADeveloper, post: 742175, membro: 118312"]
Ho realizzato un tutorial per questa meravigliosa biblioteca. Ho provato a renderlo il più semplice possibile ...
[MEDIA = youtube] eSqw5KTP_Bo [/ MEDIA]

Spero che vi piaccia
[/CITAZIONE]
i have a problem... java.lang.NoClassDefFoundError: Risoluzione non riuscita di: Landroid / support / v4 / widget / DrawerLayout $ LayoutParams; how can i solve it? thanks
 
Top