I guess its a difficult library to work with from a resources and dependency point of view.
From a code point of view its extremely simple.
From a code point of view its extremely simple.
where it is?Copy the MSMaterialDrawer.jar and xml files to your AdditionalLibs folder.
Its hidden in the first 3 posts to make sure you read all of itwhere it is?
H:\MyProjects\Github_masters\MaterialDrawer-master\MaterialDrawer-master\library\src\main\res\values\styles.xml:55: error: Error: No resource found that matches the given name: attr 'windowNoTitle'.
i dont see a blank line. what device and os are you testing on?Hello again, @thedesolatesoul .
I have a problem with this library in my new app (in other apps the library works fine).
It shows an blank line in the footer (see image1).
When I open the drawer the blank line disappears.
My code is in attached.
I tried, but I don't know what's happening and how to solve.
Thanks in advance for any tip.
View attachment 35445
Looks like files are missing from your project:
Caused by: java.lang.RuntimeException: java.io.FileNotFoundException: btn_menu5.png
i dont see a blank line. what device and os are you testing on?
'#AdditionalRes: H:\Eclipse\adt-bundle-windows-x86_64\sdk\extras\android\support\v7\appcompat\res, android.support.v7.appcompat
'#AdditionalRes: H:\MyProjects\Github_masters\MaterialDrawer-master\MaterialDrawer-master\library\src\main\res
'#AdditionalRes: H:\MyProjects\Github_masters\MaterialDrawer-master\MaterialDrawer-master\app\src\main\res
#AdditionalRes: C:\Xamarin\Android-SDK\extras\android\support\v7\appcompat\res, android.support.v7.appcompat
#AdditionalRes: C:\Xamarin\Android-SDK\Drawer\AdditionalResources\md-lib\res
#AdditionalRes: C:\Xamarin\Android-SDK\Drawer\AdditionalResources\md-app\res
** Activity (main) Pause, UserClosed = false **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (actheader) Create, isFirst = true **
actheader_activity_create (B4A line: 64)
MD = MDB.Build
android.view.InflateException: Binary XML file line #12: Error inflating class com.mikepenz.materialdrawer.view.ScrimInsetsFrameLayout
at android.view.LayoutInflater.createView(LayoutInflater.java:620)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at com.mikepenz.materialdrawer.Drawer.withDrawerLayout(Drawer.java:246)
at com.mikepenz.materialdrawer.Drawer.build(Drawer.java:965)
at com.maximussoft.msmaterialdrawer.MSMaterialDrawerBuilder.Build(MSMaterialDrawerBuilder.java:112)
at com.maximussoft.materialdrawer.actheader._activity_create(actheader.java:472)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:187)
at com.maximussoft.materialdrawer.actheader.afterFirstLayout(actheader.java:100)
at com.maximussoft.materialdrawer.actheader.access$100(actheader.java:17)
at com.maximussoft.materialdrawer.actheader$WaitForLayout.run(actheader.java:78)
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:5021)
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:827)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:643)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at android.view.LayoutInflater.createView(LayoutInflater.java:594)
... 23 more
Caused by: android.content.res.Resources$NotFoundException: Resource is not a Drawable (color or path): TypedValue{t=0x5/d=0x1 a=1}
at android.content.res.Resources.loadDrawable(Resources.java:2068)
at android.content.res.TypedArray.getDrawable(TypedArray.java:602)
at com.mikepenz.materialdrawer.view.ScrimInsetsFrameLayout.init(ScrimInsetsFrameLayout.java:66)
at com.mikepenz.materialdrawer.view.ScrimInsetsFrameLayout.<init>(ScrimInsetsFrameLayout.java:52)
... 26 more
** Activity (main) Resume **
SetApplicationAttribute(android:theme, "@android:style/Theme.Holo.Light.DarkActionBar")
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: http://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="14"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'SetApplicationAttribute(android:theme, "@android:style/Theme.AppCompat")
'SetApplicationAttribute(android:theme, "@style/Theme.AppCompat")
SetApplicationAttribute(android:theme, "@style/MaterialDrawerTheme.ActionBar")
'End of default text.
SetActivityAttribute(actLight, android:theme, "@style/MaterialDrawerTheme.Light")
MDB.AddPrimaryDrawerItem ("Notificaciones" , p1.Drawable ,Null ,"99+" ,True,1, "Shows the weather")
MDB.AddPrimaryDrawerItem ("Notifications" , LoadBitmap(File.DirAssets,"app.png") ,Null ,"99+" ,True,1, "Shows the weather")
I know, but i don't know how to load a file from my assets as drawable... i always use LoadBitmap :sUse a drawable not a bitmap.
Dim icon As BitmapDrawable
icon.Initialize(LoadBitmap(File.DirAssets,"star.png"))
...
MDB.AddPrimaryDrawerItem ("Notificaciones" , icon ,Null ,"99+" ,True,1, "Shows the weather")
there is any way to change that icon image when click in another icon or button ?I know, but i don't know how to load a file from my assets as drawable... i always use LoadBitmap :s
Edit:
I found the solution:
B4X:Dim icon As BitmapDrawable icon.Initialize(LoadBitmap(File.DirAssets,"star.png")) ... MDB.AddPrimaryDrawerItem ("Notificaciones" , icon ,Null ,"99+" ,True,1, "Shows the weather")
Thanks