MaterialDrawer V0.9 (Mike Penz)

tamba sylvester

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

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:

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.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…