MaterialDrawer V0.9 (Mike Penz)

tamba sylvester

Member
Licensed User
Longtime User
This thread is about the beta phase of my newest wrap. It is a wrap for this Github project: Material Drawer by Mike Penz

At present the library is based on Version 5.8.1 of the Github project


MaterialDrawer
Author:
Mike Penz (Github) / DonManfred (wrapper)
Version: 0.9 beta

Attachments:
MaterialDrawerEx1.zip
this contains the (most probably a bit chaotic) code for the example i build so far.
So i just tried out how work this, and this and the code came up chaotic....
I´m sure more examples will follow in future. Maybe made from one of the beatestes? (grins)

MaterialDrawerResources.zip
this zip contains the folder "resource"
copy this folder to your Project or maybe to your additional libraries folder.
you need to adapt the #additionalres directive to match your folder

MaterialDrawerFONTS1.zip and MaterialDrawerFONTS2.zip
Copy all files to your additional libs folder

MaterialDrawerAAR.zip
Contains all needed AAR files. Copy them all to your additional libs folder

The library depends on some other JARs from the google Maven repository.

Post any questions regarding this librarywrap in this Thread please.

Note that this library wrap is in development and subject to be changed before releasing the library.

The example at present state shows all i have tried so far.
Some features are not tested at all.
Some features does not work as yet. The profile and everything about the profileheaderdraweritem for example.


Known problems:
- For me the Drawer will show behind the Actionbar. Due to this the layout in the top area is not placed correctly.
I think it must be changed in the theme somehow but i´m sorr, i do not know how to fix this. Any help on this is highly appreciated!



This library is Donationware. You can download the library, you can test the library. But if you want to USE the library in your App you need to Donate for it. I spend A LOT of time to build this library.

Please click here to donate for my work to write the wrapper (You can donate any amount you want :))
i get this error

B4A version: 6.31
Parsing code. Error
Error parsing program.
Error description: Unknown type: drawerbuilder
Are you missing a library reference?
Occurred on line: 32 (Main)
Private md As DrawerBuilder
 

DonManfred

Expert
Licensed User
Longtime User
Last edited:

Angel Maza

Member
Licensed User
Longtime User
What is the event fired when SecondarySwitchDrawerItem or SwitchDrawerItem is checked/unchecked?

Thanks.
Regards.
Angel.
 

Claudio Oliveira

Active Member
Licensed User
Longtime User
For whatever reason, there are fonts missing.
If you followed the steps in post #1, it should work...
 

divinglog

Member
Licensed User
Longtime User
On Android 9 (Target API 28) I get the following crash:

B4X:
--------- beginning of crash
java.lang.IllegalArgumentException: Invalid Layer Save Flag - only ALL_SAVE_FLAGS is allowed
    at android.graphics.Canvas.checkValidSaveFlags(Canvas.java:378)
    at android.graphics.Canvas.saveLayer(Canvas.java:455)
    at com.mikepenz.materialdrawer.view.BezelImageView.onDraw(BezelImageView.java:209)
    at android.view.View.draw(View.java:20207)
    at android.view.View.updateDisplayListIfDirty(View.java:19082)
    at android.view.View.draw(View.java:19935)
    at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
    at android.view.View.updateDisplayListIfDirty(View.java:19073)
    at android.view.View.draw(View.java:19935)
    at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
    at android.view.View.draw(View.java:20210)
    at android.view.View.updateDisplayListIfDirty(View.java:19082)
    at android.view.View.draw(View.java:19935)
    at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
    at android.view.View.updateDisplayListIfDirty(View.java:19073)
    at android.view.View.draw(View.java:19935)
    at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
    at android.widget.ListView.drawChild(ListView.java:3590)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
    at android.widget.AbsListView.dispatchDraw(AbsListView.java:2639)
    at android.widget.ListView.dispatchDraw(ListView.java:3585)
    at android.view.View.draw(View.java:20210)
    at android.widget.AbsListView.draw(AbsListView.java:4320)
    at android.view.View.updateDisplayListIfDirty(View.java:19082)
    at android.view.View.draw(View.java:19935)
    at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
    at android.view.View.draw(View.java:20210)
    at android.view.View.updateDisplayListIfDirty(View.java:19082)
    at android.view.View.draw(View.java:19935)
    at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
    at android.support.v4.widget.DrawerLayout.drawChild(DrawerLayout.java:1379)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
    at android.view.View.updateDisplayListIfDirty(View.java:19073)
    at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4317)
    at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4290)
    at android.view.View.updateDisplayListIfDirty(View.java:19042)
    at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4317)
    at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4290)
    at android.view.View.updateDisplayListIfDirty(View.java:19042)
    at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4317)
    at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4290)
    at android.view.View.updateDisplayListIfDirty(View.java:19042)
    at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4317)
    at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4290)
    at android.view.View.updateDisplayListIfDirty(View.java:19042)
    at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4317)
    at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4290)
    at android.view.View.updateDisplayListIfDirty(View.java:19042)
    at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:686)
    at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:692)
    at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:801)
    at android.view.ViewRootImpl.draw(ViewRootImpl.java:3311)
    at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:3115)
    at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2484)
    at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1460)
    at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7183)
    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:949)
    at android.view.Choreographer.doCallbacks(Choreographer.java:761)
    at android.view.Choreographer.doFrame(Choreographer.java:696)
    at android.view.Chore
Message longer than Log limit (4000). Message was truncated.

Which seems to be related to:

https://github.com/mikepenz/MaterialDrawer/issues/2307

https://github.com/zsmb13/MaterialDrawerKt/issues/70

Do you know if this has been fixed in the original code and is it possible to update this wrapper? Thank you!

Btw, the same crash happens in this library: https://www.b4x.com/android/forum/threads/msmaterialdrawer.53883/
 
Last edited:

DonManfred

Expert
Licensed User
Longtime User

divinglog

Member
Licensed User
Longtime User
Definetively NO as i lost the source some time ago due to a HDD crash.

:( That's too bad. Currently I'm using the library from thedesolatesoul which I've linked, but switching to your's would have been easy because it's based on the same library. I'm afraid that the other one won't be updated either. Do you know a good replacement for material drawer?
 

divinglog

Member
Licensed User
Longtime User
I solved it by switching to the library DonManfred linked above. I was able to replicate the look and feel together with a CustomListView for the menu items.
 
Top