MSMaterialDrawer

energypf

Member
Licensed User
Longtime User
Good morning,
I followed all the driving and I was able to install the example on your smartphone, but when I click on "Dark Drawer" I get an error. I have attached a screenshot of the error. Where am I wrong?
 

Attachments

  • Screenshot_2016-10-01-12-03-03[1].png
    97 KB · Views: 453

TWCoder

New Member
Licensed User
Longtime User
Hi thedesolatesoul,

I've download all of MSMaterialDrawer zip files, and test with my real device. I 've error log file. it couldn't run.
I try to build with Android sdk 23, B4A v6.0

when I try to run this ' MDB.Initialize("MD") '.

B4X:
Installing file.
PackageAdded: package:com.maximussoft.materialdrawer
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (actlight) Create, isFirst = true **
Cannot get methods of class: com.maximussoft.msmaterialdrawer.MSMaterialDrawerBuilder, disabling cache.
java.lang.VerifyError: com/mikepenz/materialdrawer/Drawer
    at com.maximussoft.msmaterialdrawer.MSMaterialDrawerBuilder.Initialize(MSMaterialDrawerBuilder.java:57)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:515)
    at anywheresoftware.b4a.shell.Shell.runVoidMethod(Shell.java:748)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:343)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:247)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:515)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:134)
    at com.maximussoft.materialdrawer.actlight.afterFirstLayout(actlight.java:102)
    at com.maximussoft.materialdrawer.actlight.access$000(actlight.java:17)
    at com.maximussoft.materialdrawer.actlight$WaitForLayout.run(actlight.java:80)
    at android.os.Handler.handleCallback(Handler.java:733)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:136)
    at android.app.ActivityThread.main(ActivityThread.java:5072)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:515)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609)
    at dalvik.system.NativeStart.main(Native Method)
** Activity (actlight) Resume **
An error occurred:
(Line: 63) MDB.AddSecondaryDrawerItem("Settings" ,Null           ,
java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean
** Activity (main) Resume **

Any suggestions?
 
Last edited:

MAGAREY

Member
Licensed User
Longtime User
someone could be able to use this function: withHeaderBackgroundScaleType ?, I want to do is reduce the size of the header image without affecting the size of the header itself
 

JohnC

Expert
Licensed User
Longtime User
I am using this great lib, but when the drawer is first displayed, the top item in the menu is dimmed as if it is selected. If I click on another line, then the clicked line will become dim and the first line gets "unselected".

So, I have two questions:

1) How can I prevent the top/first line from being highlighted when the drawer is first displayed?
2) How can I prevent a line from staying highlighted after the user removes their finger?

UPDATE: Figured it out, I had to do this to clear all selected lines:
B4X:
MDB.withSelectedItem(-1)
 

Miguelito

Member
Licensed User
Hi, one question, where can download this library MSMaterialDrawer.jar?

Library Setup
1. Copy the MSMaterialDrawer.jar and xml files to your AdditionalLibs folder.

Thank you...
 

Miguelito

Member
Licensed User
Ricardo in the post #4.

I'm run with set to point to android-24 and I get this error:

Error:
c:\materialdrawer-develop\library\src\main\res\values\styles.xml:21: error: Error retrieving parent for item: No resource found that matches the given name 'MaterialTheme'.

It's necesary to set point android-22.
 

Ricardo Gonzalez Gaete

Member
Licensed User
Longtime User
My Error ? , Help me

B4A version: 6.30
Parsing code. (0.02s)
Compiling code. (0.05s)
Compiling layouts code. (0.00s)
Organizing libraries. (0.00s)
Generating R file. Error
invalid resource directory name: d:\program files (x86)\android\android-sdk\extras\android\support\v7\appcompat\res res.fastadapter
invalid resource directory name: d:\program files (x86)\android\android-sdk\extras\android\support\v7\appcompat\res res.Iconics
invalid resource directory name: d:\program files (x86)\android\android-sdk\extras\android\support\v7\appcompat\res res.materialdrawer
invalid resource directory name: d:\program files (x86)\android\android-sdk\extras\android\support\v7\appcompat\res res.materialize
invalid resource directory name: d:\program files (x86)\android\android-sdk\extras\android\support\v7\appcompat\res res.RecyclerView
invalid resource directory name: d:\program files (x86)\android\android-sdk\extras\android\support\v7\appcompat\res resource
 

DonManfred

Expert
Licensed User
Longtime User
B4A version: 6.30
I dont think this library is compatible with the newest Google system using the new maven repositories. you can try to edit the library´s xml-file and update the DependsOn directives to use the new maven repos
 

thedesolatesoul

Expert
Licensed User
Longtime User
I dont think this library is compatible with the newest Google system using the new maven repositories. you can try to edit the library´s xml-file and update the DependsOn directives to use the new maven repos
You are most probably correct, because I dont know about this new system at all.
 

chuath

Member
Licensed User
Longtime User
i´ll try to setup your lib on my environment to be used with b4a 6+ later today. I´ll report here.

I've used this lib in B4A 6+ environment with no problems.


this issue seems to be defining wrong path for the res? "\res res.fastadapter" ??
 

DonManfred

Expert
Licensed User
Longtime User
this issue seems to be defining wrong path for the res? "\res res.fastadapter" ??
You define the path in your project....

#additionalres: pathtoressources

Check if the resource-folders are inside your projectfolder. Otherwise you need to define the complete path to them
 

TLD

Member
Licensed User

how can i download the .jar file and .xml file
 

DonManfred

Expert
Licensed User
Longtime User
ow can i download the .jar file and .xml file
Start with READ the Releaseposts!

This is my last answer to your posts. Don´t expect to get more answers from me.

 
Reactions: TLD

hsteph

Member
Licensed User
Greetings again, ..
Went through the Material Design 1-4 exercises with success
Now experimenting this MSMaterialDrawer lib

With this setting:
#AdditionalRes: ..\resource\appcompat, android-support-v7-appcompat
#AdditionalRes: ..\resource\lib
#AdditionalRes: ..\resource\app

I get the following error while compiling
Generating R file. Error
..\resource\appcompat\values\attrs.xml:123: error: Attribute "actionBarSize" already defined with incompatible format.
C:\usr\b4a\Samples\MSMaterialDrawer\Objects\bin\extra\res1\res\values\values.xml:111: Original attribute defined here.
..\resource\appcompat\values\attrs.xml:388: error: Attribute "navigationMode" already defined with incompatible format.

If I comment this line #AdditionalRes: ..\resource\appcompat, android-support-v7-appcompat, I can compile and run the app but the icons are not displayed in the app

Also, when I open the project, I get the following warnings :
File 'magnify.png' is not used (warning #15)
Library 'AppCompat' is not used (warning #32)

Input welcome !
ps : I use android-25\android.jar
 

cambopad

Active Member
Licensed User
Longtime User
Nice lib!

How can I remove the PrimaryDrawerItem by code??? I need to dynamically display different items on the app drawer. For example, at first, I have three items on the app drawer, but then my user delete one item from there, so How can I remove that item from the app drawer??? Please anyone?
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…