Android Question AHNavigationDrawer / ActionDrawer not working in AndroidX

infow

Member
Licensed User
Longtime User
Getting this error, any ideas? Thanks:

B4X:
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/widget/DrawerLayout$LayoutParams;
    at de.amberhome.navdrawer.NavigationDrawer.Initialize2(NavigationDrawer.java:82)
    at de.amberhome.navdrawer.NavigationDrawer.Initialize(NavigationDrawer.java:67)
    at ifw.gamefvm.actiondrawer._initialize(actiondrawer.java:493)
    at ifw.gamefvm.main$ResumableSub_Activity_Create.resume(main.java:790)
    at anywheresoftware.b4a.shell.DebugResumableSub$DelegatableResumableSub.resumeAsUserSub(DebugResumableSub.java:48)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:176)
    at anywheresoftware.b4a.shell.DebugResumableSub$DelegatableResumableSub.resume(DebugResumableSub.java:43)
    at anywheresoftware.b4a.BA.checkAndRunWaitForEvent(BA.java:250)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:137)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:176)
    at anywheresoftware.b4a.keywords.Common$14.run(Common.java:1761)
    at android.os.Handler.handleCallback(Handler.java:883)
    at android.os.Handler.dispatchMessage(Handler.java:100)
    at android.os.Looper.loop(Looper.java:237)
    at android.app.ActivityThread.main(ActivityThread.java:7777)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1047)
Caused by: java.lang.ClassNotFoundException: android.support.v4.widget.DrawerLayout$LayoutParams
    ... 24 more
** Activity (main) Pause, UserClosed = false **
sending message to waiting queue (activity_permissionresult)
running waiting messages (1)
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = true **
 
Last edited:

infow

Member
Licensed User
Longtime User
Tried B4XDrawer get all sorts of errors:
B4X:
Logger connected to: RQ8M30JG6YV
--------- beginning of crash
--------- beginning of main
--------- beginning of system
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
Error occurred on line: 217 (B4XDrawer)
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:170)
    at anywheresoftware.b4a.objects.PanelWrapper.LoadLayout(PanelWrapper.java:134)
    at anywheresoftware.b4a.objects.B4XViewWrapper.LoadLayout(B4XViewWrapper.java:293)
    at b4a.example.main._activity_create(main.java:391)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
    at b4a.example.main.afterFirstLayout(main.java:104)
    at b4a.example.main.access$000(main.java:17)
    at b4a.example.main$WaitForLayout.run(main.java:82)
    at android.os.Handler.handleCallback(Handler.java:883)
    at android.os.Handler.dispatchMessage(Handler.java:100)
    at android.os.Looper.loop(Looper.java:237)
    at android.app.ActivityThread.main(ActivityThread.java:7777)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1047)
Caused by: java.lang.reflect.InvocationTargetException
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.objects.CustomViewWrapper.AfterDesignerScript(CustomViewWrapper.java:64)
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:162)
    ... 19 more
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v7/widget/Toolbar;
    at de.amberhome.objects.appcompat.ACToolbarLightWrapper.innerInitialize(ACToolbarLightWrapper.java:25)
    at anywheresoftware.b4a.objects.ViewWrapper.Initialize(ViewWrapper.java:67)
    at de.amberhome.objects.appcompat.ACToolBarWrapper.Initialize(ACToolBarWrapper.java:62)
    at de.amberhome.objects.appcompat.ACToolBarWrapper._initialize(ACToolBarWrapper.java:141)
    ... 22 more
Caused by: java.lang.ClassNotFoundException: android.support.v7.widget.Toolbar
    ... 26 more
** Activity (main) Resume **
 
Upvote 0

infow

Member
Licensed User
Longtime User
This sample worked well:
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v7/widget/Toolbar;
This error means that you are using a non-jetified version of AppCompat.

1. AppCompat is not related to B4XDrawer. It is just used in that example.
2. The solution is very simple. Download AppCompat library again and make sure that there are no old copies of it in the internal libraries folder.
 
Upvote 0

infow

Member
Licensed User
Longtime User
This error means that you are using a non-jetified version of AppCompat.

1. AppCompat is not related to B4XDrawer. It is just used in that example.
2. The solution is very simple. Download AppCompat library again and make sure that there are no old copies of it in the internal libraries folder.

About the AHNavigationDrawer? It´s obsolete now?

Thanks
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
It´s obsolete now?
No, i am still using it.
But as you are using AndroidX you need to use the correct AndroidX Artifact for Appcompat. Download Appcompat 4.0 zip AGAIN and use the files in the zip.
 
Upvote 0

infow

Member
Licensed User
Longtime User
After update AppCompat, insert Appcompat lib into my project don´t compile, I´m getting:

B4X:
B4A Version: 9.80
Java Version: 8
Parsing code.    (0.20s)
Building folders structure.    (0.05s)
Compiling code.    (0.99s)
Compiling layouts code.    (0.03s)
Organizing libraries.    (0.00s)
    (AndroidX SDK)
Generating R file.    (2.32s)
Compiling debugger engine code.    (2.43s)
Compiling generated Java code.    (3.53s)
Convert byte code - optimized dex.    Error
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.xerces.dom.CharacterDataImpl$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.xerces.dom.ParentNode$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.xerces.dom.SecuritySupport$3) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.xerces.dom.SecuritySupport$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.xerces.dom.SecuritySupport$2) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.xerces.dom.SecuritySupport$6) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.xerces.dom.SecuritySupport$4) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.xerces.dom.SecuritySupport$8) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.xerces.dom.SecuritySupport$5) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.xerces.dom.SecuritySupport$7) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.xerces.impl.XMLErrorReporter$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.xerces.impl.dv.SecuritySupport$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.xerces.impl.dv.SecuritySupport$2) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.xerces.impl.dv.SecuritySupport$3) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.xerces.impl.dv.SecuritySupport$4) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.xerces.impl.dv.SecuritySupport$5) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.xerces.impl.dv.SecuritySupport$6) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.xerces.impl.dv.SecuritySupport$7) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.xerces.impl.dv.SecuritySupport$8) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.xerces.impl.xs.util.StringListImpl$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.xerces.impl.xs.util.XSObjectListImpl$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.xerces.parsers.AbstractSAXParser$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.xerces.parsers.AbstractSAXParser$2) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.xerces.parsers.SecuritySupport$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.xerces.parsers.SecuritySupport$2) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.xerces.parsers.SecuritySupport$3) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.xerces.parsers.SecuritySupport$4) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.xerces.parsers.SecuritySupport$5) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.xerces.parsers.SecuritySupport$6) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.xerces.parsers.SecuritySupport$7) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.xerces.parsers.SecuritySupport$8) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.xerces.util.ErrorHandlerWrapper$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.xerces.util.JAXPNamespaceContextWrapper$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.xml.serialize.SecuritySupport$3) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.xml.serialize.SecuritySupport$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.xml.serialize.SecuritySupport$2) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.xml.serialize.SecuritySupport$6) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.xml.serialize.SecuritySupport$4) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.xml.serialize.SecuritySupport$5) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.xml.serialize.SecuritySupport$7) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.xml.serialize.SecuritySupport$8) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(nu.xom.Verifier$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
trouble writing output: Too many method references to fit in one dex file: 71549; max is 65536.
You may try using multi-dex. If multi-dex is enabled then the list of classes for the main dex list is too large.
References by package:
    60 adr.stringfunctions
     4 android.accessibilityservice
     5 android.accounts
    72 android.animation
   493 android.app
    17 android.app.job
     2 android.appwidget
    20 android.bluetooth
   234 android.content
    77 android.content.pm
   109 android.content.res
    68 android.database
    25 android.database.sqlite
   276 android.graphics
   139 android.graphics.drawable
     3 android.graphics.drawable.shapes
    12 android.graphics.fonts
     3 android.graphics.pdf
    47 android.hardware
     3 android.hardware.display
    11 android.hardware.fingerprint
     2 android.icu.text
     3 android.icu.util
    40 android.location
   231 android.media
    18 android.media.browse
    97 android.media.session
    58 android.net
     2 android.net.http
    36 android.opengl
   333 android.os
     1 android.preference
    28 android.print
     5 android.print.pdf
    15 android.provider
     8 android.renderscript
     2 android.security
    11 android.service.media
    70 android.support.customtabs
    20 android.support.v4.app
     3 android.support.v4.graphics.drawable
   298 android.support.v4.media
   931 android.support.v4.media.session
    28 android.support.v4.os
     2 android.support.v4.view
    15 android.support.v4.widget
     3 android.system
    17 android.telephony
     2 android.telephony.mbms
   119 android.text
     1 android.text.format
     6 android.text.method
    16 android.text.style
    10 android.text.util
    18 android.transition
   119 android.util
   808 android.view
   259 android.view.accessibility
    54 android.view.animation
    15 android.view.inputmethod
     1 android.view.textclassifier
   105 android.webkit
   844 android.widget
    73 androidx.activity
    54 androidx.annotation
    15 androidx.appcompat
   916 androidx.appcompat.app
    10 androidx.appcompat.content.res
   328 androidx.appcompat.graphics.drawable
    15 androidx.appcompat.resources
     3 androidx.appcompat.text
   155 androidx.appcompat.view
   724 androidx.appcompat.view.menu
  2538 androidx.appcompat.widget
    25 androidx.arch.core.executor
    53 androidx.arch.core.internal
     1 androidx.arch.core.util
    20 androidx.asynclayoutinflater.view
    15 androidx.browser
    55 androidx.browser.browseractions
   129 androidx.browser.customtabs
   307 androidx.collection
    15 androidx.coordinatorlayout
   220 androidx.coordinatorlayout.widget
    15 androidx.core
     6 androidx.core.accessibilityservice
   788 androidx.core.app
    70 androidx.core.content
    66 androidx.core.content.pm
   105 androidx.core.content.res
     5 androidx.core.database
     2 androidx.core.database.sqlite
   177 androidx.core.graphics
   183 androidx.core.graphics.drawable
     6 androidx.core.hardware.display
    27 androidx.core.hardware.fingerprint
    90 androidx.core.internal.view
     2 androidx.core.location
     5 androidx.core.math
    32 androidx.core.net
   108 androidx.core.os
    87 androidx.core.provider
     2 androidx.core.telephony.mbms
   118 androidx.core.text
    35 androidx.core.text.util
    59 androidx.core.util
   622 androidx.core.view
   340 androidx.core.view.accessibility
    10 androidx.core.view.animation
    44 androidx.core.view.inputmethod
   339 androidx.core.widget
    70 androidx.cursoradapter.widget
    17 androidx.customview.view
   146 androidx.customview.widget
    95 androidx.documentfile.provider
   170 androidx.drawerlayout.widget
    15 androidx.fragment
  1048 androidx.fragment.app
    84 androidx.fragment.lint
    11 androidx.interpolator.view.animation
    30 androidx.legacy.app
     4 androidx.legacy.content
    11 androidx.legacy.widget
   238 androidx.lifecycle
    62 androidx.loader.app
   122 androidx.loader.content
    13 androidx.localbroadcastmanager.content
   392 androidx.media
    31 androidx.media.app
    15 androidx.media.session
    48 androidx.print
    25 androidx.savedstate
   117 androidx.slidingpanelayout.widget
   230 androidx.swiperefreshlayout.widget
   322 androidx.vectordrawable.graphics.drawable
   240 androidx.versionedparcelable
   279 androidx.viewpager.widget
   227 anywheresoftware.b4a
    91 anywheresoftware.b4a.admobwrapper
    25 anywheresoftware.b4a.agraham.byteconverter
   191 anywheresoftware.b4a.agraham.dialogs
    66 anywheresoftware.b4a.agraham.reflection
   110 anywheresoftware.b4a.audio
    90 anywheresoftware.b4a.debug
    54 anywheresoftware.b4a.gps
   280 anywheresoftware.b4a.keywords
    14 anywheresoftware.b4a.keywords.constants
   121 anywheresoftware.b4a.net
  1240 anywheresoftware.b4a.objects
    89 anywheresoftware.b4a.objects.collections
   110 anywheresoftware.b4a.objects.drawable
    81 anywheresoftware.b4a.objects.streams
   254 anywheresoftware.b4a.phone
   154 anywheresoftware.b4a.randomaccessfile
    30 anywheresoftware.b4a.remotelogger
   101 anywheresoftware.b4a.shell
    49 anywheresoftware.b4a.sql
    65 anywheresoftware.b4h.okhttp
    26 anywheresoftware.b4j.object
   133 b4a.example
     5 b4a.util
    14 com.AB.ABZipUnzip
     5 com.android.tools.lint.client.api
    23 com.android.tools.lint.detector.api
    30 com.google.ads
   134 com.google.ads.consent
   101 com.google.ads.mediation
     2 com.google.ads.mediation.admob
    40 com.google.ads.mediation.customevent
     4 com.google.android.gms.actions
   279 com.google.android.gms.ads
    27 com.google.android.gms.ads.appopen
    97 com.google.android.gms.ads.doubleclick
   269 com.google.android.gms.ads.formats
    32 com.google.android.gms.ads.identifier
    15 com.google.android.gms.ads.impl
    10 com.google.android.gms.ads.initialization
    16 com.google.android.gms.ads.instream
   155 com.google.android.gms.ads.internal
   111 com.google.android.gms.ads.internal.overlay
   198 com.google.android.gms.ads.mediation
     2 com.google.android.gms.ads.mediation.admob
    64 com.google.android.gms.ads.mediation.customevent
    10 com.google.android.gms.ads.mediation.rtb
    17 com.google.android.gms.ads.query
    32 com.google.android.gms.ads.reward
    17 com.google.android.gms.ads.reward.mediation
    36 com.google.android.gms.ads.rewarded
   122 com.google.android.gms.ads.search
    84 com.google.android.gms.auth.api.signin
    28 com.google.android.gms.auth.api.signin.internal
    15 com.google.android.gms.base
   276 com.google.android.gms.common
   286 com.google.android.gms.common.api
   937 com.google.android.gms.common.api.internal
    29 com.google.android.gms.common.config
   142 com.google.android.gms.common.data
    82 com.google.android.gms.common.images
   557 com.google.android.gms.common.internal
   152 com.google.android.gms.common.internal.safeparcel
    28 com.google.android.gms.common.internal.service
    15 com.google.android.gms.common.logging
     5 com.google.android.gms.common.providers
     7 com.google.android.gms.common.server
    28 com.google.android.gms.common.server.converter
   210 com.google.android.gms.common.server.response
    10 com.google.android.gms.common.sqlite
    41 com.google.android.gms.common.stats
   178 com.google.android.gms.common.util
    10 com.google.android.gms.common.util.concurrent
    16 com.google.android.gms.common.wrappers
   205 com.google.android.gms.dynamic
    65 com.google.android.gms.dynamite
     1 com.google.android.gms.dynamite.descriptors.com.google.android.gms.ads.dynamite
     1 com.google.android.gms.dynamite.descriptors.com.google.android.gms.measurement.dynamite
    64 com.google.android.gms.gass
    74 com.google.android.gms.gass.internal
 17741 com.google.android.gms.internal.ads
    19 com.google.android.gms.internal.ads_identifier
    74 com.google.android.gms.internal.base
    37 com.google.android.gms.internal.common
    32 com.google.android.gms.internal.firebase_messaging
  3287 com.google.android.gms.internal.measurement
    94 com.google.android.gms.measurement
    29 com.google.android.gms.measurement.api
  2211 com.google.android.gms.measurement.internal
     4 com.google.android.gms.measurement.module
    13 com.google.android.gms.security
    27 com.google.android.gms.signin
    67 com.google.android.gms.signin.internal
    18 com.google.android.gms.stats
   194 com.google.android.gms.tasks
     2 com.google.auto.value
   100 com.google.firebase
    49 com.google.firebase.analytics
    38 com.google.firebase.analytics.connector
    35 com.google.firebase.analytics.connector.internal
   150 com.google.firebase.components
     9 com.google.firebase.events
    22 com.google.firebase.heartbeatinfo
   300 com.google.firebase.iid
     2 com.google.firebase.iid.internal
     1 com.google.firebase.inject
     5 com.google.firebase.internal
    28 com.google.firebase.platforminfo
    10 com.google.firebase.provider
   309 com.google.gson
     8 com.google.gson.annotations
   292 com.google.gson.internal
   332 com.google.gson.internal.bind
    10 com.google.gson.internal.bind.util
    11 com.google.gson.internal.reflect
    20 com.google.gson.reflect
    86 com.google.gson.stream
   151 com.google.zxing
    16 com.google.zxing.aztec
    18 com.google.zxing.aztec.decoder
    26 com.google.zxing.aztec.detector
    59 com.google.zxing.aztec.encoder
   303 com.google.zxing.client.result
   127 com.google.zxing.common
    14 com.google.zxing.common.detector
    34 com.google.zxing.common.reedsolomon
    12 com.google.zxing.datamatrix
    59 com.google.zxing.datamatrix.decoder
    19 com.google.zxing.datamatrix.detector
   120 com.google.zxing.datamatrix.encoder
     6 com.google.zxing.maxicode
    18 com.google.zxing.maxicode.decoder
    12 com.google.zxing.multi
    10 com.google.zxing.multi.qrcode
    18 com.google.zxing.multi.qrcode.detector
   169 com.google.zxing.oned
    59 com.google.zxing.oned.rss
    56 com.google.zxing.oned.rss.expanded
   114 com.google.zxing.oned.rss.expanded.decoders
    31 com.google.zxing.pdf417
   125 com.google.zxing.pdf417.decoder
    31 com.google.zxing.pdf417.decoder.ec
    12 com.google.zxing.pdf417.detector
    56 com.google.zxing.pdf417.encoder
    12 com.google.zxing.qrcode
   110 com.google.zxing.qrcode.decoder
    60 com.google.zxing.qrcode.detector
    80 com.google.zxing.qrcode.encoder
     7 com.intellij.psi
     1 com.intellij.psi.util
   433 com.nineoldandroids.animation
    22 com.nineoldandroids.util
   229 com.nineoldandroids.view
    38 com.nineoldandroids.view.animation
    35 com.rootsoft.bitmaplibrary
    12 com.rootsoft.customtoast
     2 com.sun.org.apache.xerces.internal.parsers
     1 com.sun.org.apache.xerces.internal.util
     8 com.whatsapp
     5 dalvik.system
    50 de.amberhome.navdrawer
   146 de.amberhome.navdrawer.internal
   512 de.amberhome.objects.appcompat
    54 de.amberhome.objects.appcompat.internal
    14 de.donmanfred
     6 default
    45 flm.b4a.betterdialogs
     9 flm.b4a.bitmapplus
    89 flm.b4a.maskededittext
   162 flm.b4a.scrollview2d
    32 flm.media.browser
   765 ifw.gamefvm
    33 ifw.gamefvm.designerscripts
   249 java.io
   481 java.lang
     8 java.lang.ref
    57 java.lang.reflect
    34 java.math
   181 java.net
    89 java.nio
    20 java.nio.channels
     9 java.nio.charset
     2 java.nio.file
    49 java.security
    15 java.security.cert
     4 java.security.interfaces
    19 java.security.spec
     3 java.sql
    53 java.text
   466 java.util
   137 java.util.concurrent
    41 java.util.concurrent.atomic
    19 java.util.concurrent.locks
     6 java.util.logging
    27 java.util.regex
    46 java.util.zip
    29 javax.crypto
     5 javax.crypto.spec
    12 javax.microedition.khronos.egl
     6 javax.net
    98 javax.net.ssl
     3 javax.security.auth.x500
     2 javax.xml.namespace
     7 javax.xml.parsers
     9 javax.xml.transform
     2 javax.xml.transform.sax
     2 junit.framework
     3 kotlin
     5 kotlin.collections
     1 kotlin.jvm.functions
     5 kotlin.jvm.internal
     2 kotlin.sequences
     2 kotlin.text
     4 libcore.io
     5 main.java.me.dm7.barcodescanner
   116 main.java.me.dm7.barcodescanner.core
    36 main.java.me.dm7.barcodescanner.zxing
   786 nu.xom
    59 nu.xom.canonical
    38 nu.xom.converters
   256 nu.xom.jaxen
   388 nu.xom.jaxen.expr
    35 nu.xom.jaxen.expr.iter
    93 nu.xom.jaxen.function
    18 nu.xom.jaxen.function.ext
     3 nu.xom.jaxen.function.xslt
    68 nu.xom.jaxen.saxpath
    94 nu.xom.jaxen.saxpath.base
    49 nu.xom.jaxen.saxpath.helpers
    41 nu.xom.jaxen.util
    26 nu.xom.tests
    66 nu.xom.xinclude
    69 nu.xom.xslt
   720 okhttp3
    57 okhttp3.internal
    93 okhttp3.internal.cache
    17 okhttp3.internal.cache2
    66 okhttp3.internal.connection
    73 okhttp3.internal.http
    45 okhttp3.internal.http1
   287 okhttp3.internal.http2
   197 okhttp3.internal.huc
    18 okhttp3.internal.io
    61 okhttp3.internal.platform
    39 okhttp3.internal.tls
    73 okhttp3.internal.ws
   588 okio
   104 org.apache.commons.net
   434 org.apache.commons.net.ftp
   123 org.apache.commons.net.ftp.parser
    75 org.apache.commons.net.io
    92 org.apache.commons.net.pop3
   120 org.apache.commons.net.smtp
   121 org.apache.commons.net.util
    35 org.apache.james.mime4j.codec
     7 org.apache.james.mime4j.util
  1343 org.apache.xerces.dom
    18 org.apache.xerces.dom.events
   449 org.apache.xerces.impl
   304 org.apache.xerces.impl.dtd
    65 org.apache.xerces.impl.dtd.models
    81 org.apache.xerces.impl.dv
    29 org.apache.xerces.impl.dv.dtd
    17 org.apache.xerces.impl.dv.util
    39 org.apache.xerces.impl.io
     2 org.apache.xerces.impl.msg
    42 org.apache.xerces.impl.validation
    47 org.apache.xerces.impl.xs.util
    93 org.apache.xerces.jaxp
   462 org.apache.xerces.parsers
   559 org.apache.xerces.util
   153 org.apache.xerces.xni
    31 org.apache.xerces.xni.grammars
    81 org.apache.xerces.xni.parser
   202 org.apache.xerces.xs
    30 org.apache.xerces.xs.datatypes
    15 org.apache.xml.resolver
     2 org.apache.xml.resolver.readers
   403 org.apache.xml.serialize
    22 org.jetbrains.uast
     1 org.jetbrains.uast.kotlin
     2 org.jetbrains.uast.visitor
    53 org.json
   130 org.w3c.dom
     3 org.w3c.dom.events
     1 org.w3c.dom.html
    21 org.w3c.dom.ls
     7 org.w3c.dom.ranges
     1 org.w3c.dom.traversal
    79 org.xml.sax
    15 org.xml.sax.ext
    19 org.xml.sax.helpers
    15 org.xmlpull.v1
    22 sun.misc
   229 uk.co.martinpearman.b4a.xom
    49 zxingbarcodescannerwrapper
 
Upvote 0

infow

Member
Licensed User
Longtime User
Tried to extend the MaxRamForDex with no luck. Tried to change to 64bits Java, it says that it´s installed but no javaw.exe in
C:\Program Files\Java\jre1.8.0_101\bin\javaw.exe
 
Upvote 0

infow

Member
Licensed User
Longtime User
Add

B4X:
#MultiDex: True

to your code.

This solved Dex problem! Thanks.

The
B4X:
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/widget/DrawerLayout$LayoutParams;
Caused by: java.lang.ClassNotFoundException: android.support.v4.widget.DrawerLayout$LayoutParams
Error persists
 
Upvote 0

infow

Member
Licensed User
Longtime User
Yes, I put in addional lib folder, not in the lib folder.
Put: #AdditionalJar: com.android.support:support-v4 (don´t work with or without)
 
Upvote 0

infow

Member
Licensed User
Longtime User
Isolating from my project, I use the example that comes with AHNavigationDrawer, when I choose the target version to 28 it gives the problem... 14 works well
 
Upvote 0

corwin42

Expert
Licensed User
Longtime User
Have you installed
androidx.drawerlayout:drawerlayout
?

Another thing. I have tried to compile the AHNavigationDrawer example and I had to add:

#AdditionalJar: com.android.support:support-v4, ReferenceOnly

to the project code. Otherwise I got a "Not Found: C:\Program Files (x86)\Anywhere Software\Basic4android\libraries\android-support-v4.jar
 
Upvote 0

infow

Member
Licensed User
Longtime User
Have you installed
androidx.drawerlayout:drawerlayout
?

Another thing. I have tried to compile the AHNavigationDrawer example and I had to add:

#AdditionalJar: com.android.support:support-v4, ReferenceOnly

to the project code. Otherwise I got a "Not Found: C:\Program Files (x86)\Anywhere Software\Basic4android\libraries\android-support-v4.jar
Still no luck, Androidx driving me crazy... :)
1583250272817.png
 
Upvote 0

infow

Member
Licensed User
Longtime User
Really didn´t want lose ActionDrawer, that uses the AHNavigationDrawer , that´s really do all we need.
 
Last edited:
Upvote 0

infow

Member
Licensed User
Longtime User
I adapted ActionDrawer Class to work with B4XDrawer instead AHNavigationDrawer:

B4X:
Private Sub Class_Globals
    Public NavDrawer As B4XDrawer
    Public DrawerPanel As Panel
    Private pCont As Panel
    Public pContent As Panel
    
    Public AppTitle As String
    Public SectionTitle As String
    Private PrevAction As String = "Swipe"
    Private PrevState As String = "Closed"

    Private tLongPress As Timer
    Private CT As CustomToast
    Private ToolTip As String
    
    Public lTitle As Label
    Private ActionBar As Panel
    Private iBevel As ImageView
    Private iShadow As ImageView
    Private iIcon As ImageView   
    Private iDrawerIcon As ImageView
    Private iOverflow As ImageView
    Private iAction1 As ImageView
    Private iAction2 As ImageView
    Private iAction3 As ImageView
    Private iAction4 As ImageView
    Private iAction5 As ImageView
    
    Private pHome As Panel
    Private pAction1 As Panel
    Private pAction2 As Panel
    Private pAction3 As Panel
    Private pAction4 As Panel
    Private pAction5 As Panel
    Private pOverflow As Panel
    Private r As Reflector   
    Private ttl As String
    Private HomeWidth As Int
    Private Landscape As Boolean
    
    Private Event1 As String
    Private Event2 As String
    Private Event3 As String
    Private Event4 As String
    Private Event5 As String
    
    Private Name1 As String
    Private Name2 As String
    Private Name3 As String
    Private Name4 As String
    Private Name5 As String
    
    Private sOverflow As Spinner
    Private OverflowList As List
    
    Private Thm As String
    Private LtTxt As Boolean
    Private Slct As Int
    Private Drwr As String
    
    Private Offset As Int
    Private PrevIndicator As String
End Sub

'Initializes the ActionBar and adds it the activity
'Title = Text to be shown
'Icon = An image file in the files folder, eg "icon.png"
'LightText = Whether the title, drawer icon and overflow button should be light or dark
'Color = Color of the actionbar
'Theme = Light or Dark, themes overflow menu and drawer
'Bevel = Whether to add a bevel effect to the bottom of the bar
'Shadow = Whether to add a dropshadow below the actionbar
'Drawer = Whether to add the navigation drawer to the Activity
'OverflowItems = List of items to add to the overflow menu. List should have at least one item
'Indicator = Determines which symbol is shown in the top corner out of "Drawer", "Up", or "None"
'ADActivity = Pass the current activity. This lets the class access it
'Module = Pass Me
Public Sub Initialize(Title As String, Icon As String, LightText As Boolean, Color As Int, Theme As String, Bevel As Boolean, Shadow As Boolean, Drawer As Boolean, OverflowItems As List, Indicator As String, ADActivity As Activity, Module As Object)
    #Region Initialize
    lTitle.Initialize("")
    ActionBar.Initialize("")
    iBevel.Initialize("")
    iShadow.Initialize("")
    iIcon.Initialize("")
    iDrawerIcon.Initialize("")
    iAction1.Initialize("")
    iAction2.Initialize("")
    iAction3.Initialize("")
    iAction4.Initialize("")
    iAction5.Initialize("")
    iOverflow.Initialize("")
    pHome.Initialize("")
    pAction1.Initialize("")
    pAction2.Initialize("")
    pAction3.Initialize("")
    pAction4.Initialize("")
    pAction5.Initialize("")
    pOverflow.Initialize("")
    OverflowList.Initialize
    sOverflow.Initialize("sOverflow")
    SectionTitle = Title
    PrevIndicator = Indicator
    CT.Initialize
    tLongPress.Initialize("tLongPress", 1000)
    pContent.Initialize("")
    #End Region
        
    #Region Get Orientation
    Dim pnl As Panel
    pnl = ADActivity
    Dim LSInt As Int
    If pnl.Height/pnl.Width < 1 Then
        Landscape = True
        LSInt = 1
    Else
        Landscape = False
        LSInt = 0
    End If
    #End Region
    
    If Theme = "Dark" Then
        Thm = "white"
        Slct = Colors.ARGB(127,255,255,255)
    Else
        Thm = "gray"
        Slct = Colors.ARGB(127,0,0,0)
    End If
    
    lTitle.Text = Title
    ttl = Title
    LtTxt = LightText
    If LightText Then
        lTitle.TextColor = Colors.White
    Else
        lTitle.TextColor = Colors.Black
    End If
    lTitle.TextSize = 18
    r.Target = lTitle
    r.RunMethod2("setSingleLine", True, "java.lang.boolean")
    
    

    
    
    Dim str As String
    str = Icon
    iIcon.SetBackgroundImage(LoadBitmap(File.DirAssets, str))
    iIcon.Gravity = Gravity.FILL
    
    ActionBar.Color = Color
    Dim w, h As Int
    If Landscape Then
        h = 40dip
    Else
        h = 48dip
    End If

    w = pnl.Width   
    r.Target = pnl
    If w = -1 Then w = r.RunMethod("getWidth")
    
    
    
    If Bevel Then
        iBevel.Color = Colors.ARGB(40, 0, 0, 0)
    Else
        iBevel.Color = Colors.Transparent
    End If
    
    
    Dim Bm As BitmapDrawable
    Bm=GetDrawable("ic_overflow_" & Thm)
    iOverflow.Bitmap=Bm.Bitmap
    iOverflow.Gravity = Gravity.CENTER
    
    
    Dim Bm2 As BitmapDrawable
    If Indicator = "Drawer" Then
        Bm2=GetDrawable("ic_drawer_" & Thm)
        iDrawerIcon.Bitmap=Bm2.Bitmap
        iDrawerIcon.Gravity = Gravity.CENTER_VERTICAL
    Else
        If Indicator = "Up" Then
            Bm2=GetDrawable("ic_up_" & Thm)
            iDrawerIcon.Bitmap=Bm2.Bitmap
            iDrawerIcon.Gravity = Gravity.CENTER_VERTICAL
        End If
    End If
    
    
    
    
    
    If Landscape Then
        
        ActionBar.AddView(iDrawerIcon, -8dip, 4dip, 32dip, 32dip)
        ActionBar.AddView(iIcon, 13dip, 4dip, 32dip, 32dip)
        ActionBar.AddView(iOverflow, 100%x - 48dip, 0dip, 48dip, 40dip)
        ActionBar.AddView(pHome, 0dip, 0dip, 0dip, 40dip)
        ActionBar.AddView(pOverflow, 100%x - 48dip, 0, 48dip, 40dip)
        ActionBar.AddView(lTitle, 58dip, 11dip - 4dip*LSInt, 0dip, 34dip)
    Else
        
        ActionBar.AddView(iDrawerIcon, -8dip, 8dip, 32dip, 32dip)
        ActionBar.AddView(iIcon, 13dip, 8dip, 32dip, 32dip)
        ActionBar.AddView(iOverflow, 100%x - 44dip, 4dip, 40dip, 40dip)
        ActionBar.AddView(pHome, 0dip, 0dip, 0dip, 48dip)
        ActionBar.AddView(pOverflow, 100%x - 48dip, 0, 48dip, 48dip)
        ActionBar.AddView(lTitle, 58dip, 11dip - 4dip*LSInt, 0dip, 34dip)
    End If
    
    
    CallSubDelayed("", "Title_Resize")   
    
    ActionBar.AddView(iBevel, 0, h - 2dip, w, 2dip)
    pnl.AddView(ActionBar, 0, 0, w, h)
    #Region Listeners
    If Indicator = "Drawer" Or Indicator = "Up" Then
        r.Target = pHome
        r.SetOnTouchListener("Home_onTouch")
        r.SetOnClickListener("Home_Click")
    End If
    r.Target = pAction1
    r.SetOnTouchListener("Action1_onTouch")
    r.SetOnClickListener("Action1_Click")
    r.Target = pAction2
    r.SetOnTouchListener("Action2_onTouch")
    r.SetOnClickListener("Action2_Click")
    r.Target = pAction3
    r.SetOnTouchListener("Action3_onTouch")
    r.SetOnClickListener("Action3_Click")
    r.Target = pAction4
    r.SetOnTouchListener("Action4_onTouch")
    r.SetOnClickListener("Action4_Click")
    r.Target = pAction5
    r.SetOnTouchListener("Action5_onTouch")   
    r.SetOnClickListener("Action5_Click")
    r.Target = pOverflow
    r.SetOnTouchListener("Overflow_onTouch")
    r.SetOnClickListener("Overflow_Click")
    #End Region
    
    CallSubDelayed2("", "OverflowInit", OverflowItems)
    
    Drwr = Indicator
    If Drawer Then
        pCont.Initialize("")
        If Landscape Then
            pnl.AddView(pCont, 0, 40dip, 100%x, 100%y - 40dip)
        Else
            pnl.AddView(pCont, 0, 48dip, 100%x, 100%y - 48dip)
        End If
        NavDrawer.Initialize(Me, "Drawer", pCont, 240dip)
        'NavDrawer.Initialize("Drawer", pCont, 240dip)
        NavDrawer.LeftPanel.Color = Colors.RGB(48,48,48)
        DrawerPanel.Initialize("")
        NavDrawer.LeftPanel.AddView(DrawerPanel, 0, 0, 240dip, pCont.Height)
        pContent = NavDrawer.CenterPanel
        If Theme = "Dark" Then
            NavDrawer.CenterPanel.Color = Colors.RGB(48,48,48)
        Else
            NavDrawer.CenterPanel.Color = Colors.White
        End If
    End If
    If Shadow Then
        Bm=GetDrawable("shadow")
        iShadow.Bitmap=Bm.Bitmap
        iShadow.Gravity = Gravity.FILL
        If Drawer Then
            NavDrawer.CenterPanel.AddView(iShadow, 0, 0, w, 10dip)
            CallSubDelayed("", "ShadowSendToBack")
        Else   
            If Landscape Then
                pnl.AddView(iShadow, 0, 40dip, w, 10dip)
            Else
                pnl.AddView(iShadow, 0, 48dip, w, 10dip)
            End If
        End If
    End If
End Sub

Private Sub ShadowSendToBack
    iShadow.BringToFront
End Sub

'Adds a single item to the actionbar
'Name = The name seen when action is longpressd or moved to the overflow menu
'Event = The sub that will be called when the button is clicked
'Icon = An image file in the files folder, eg "ic_search.png"
Public Sub AddAction(Name As String, EventName As String, Icon As String)
    Title_Resize
    Select ActionBar.NumberOfViews - 7
        Case 0
            Event1 = EventName
            Name1 = Name
            Dim Canvas1 As Canvas
            Canvas1.Initialize(ActionBar)
            If lTitle.Text = ttl Or Canvas1.MeasureStringWidth(lTitle.Text, lTitle.Typeface, lTitle.TextSize) > 200dip Then
                If Landscape Then
                    ActionBar.AddView(iAction1, 100%x - 88dip, 4dip, 32dip, 32dip)
                    ActionBar.AddView(pAction1, 100%x - 96dip, 0dip, 48dip, 40dip)
                Else
                    ActionBar.AddView(iAction1, 100%x - 88dip, 8dip, 32dip, 32dip)
                    ActionBar.AddView(pAction1, 100%x - 96dip, 0dip, 48dip, 48dip)
                End If
                Dim str As String
                str = Icon
                iAction1.SetBackgroundImage(LoadBitmap(File.DirAssets, str))
                iAction1.Gravity = Gravity.FILL
                
            Else
                OverflowList.InsertAt(0, Name & "  ")
            End If
        Case 2
            Event2 = EventName
            Name2 = Name
            Dim Canvas1 As Canvas
            Canvas1.Initialize(ActionBar)
            If lTitle.Text = ttl Or Canvas1.MeasureStringWidth(lTitle.Text, lTitle.Typeface, lTitle.TextSize) > 200dip Then
                If Landscape Then
                    ActionBar.AddView(iAction2, 100%x - 136dip, 4dip, 32dip, 32dip)
                    ActionBar.AddView(pAction2, 100%x - 144dip, 0dip, 48dip, 40dip)
                Else
                    ActionBar.AddView(iAction2, 100%x - 136dip, 8dip, 32dip, 32dip)
                    ActionBar.AddView(pAction2, 100%x - 144dip, 0dip, 48dip, 48dip)
                End If
                Dim str As String
                str = Icon
                iAction2.SetBackgroundImage(LoadBitmap(File.DirAssets, str))
                iAction2.Gravity = Gravity.FILL
                
            Else
                OverflowList.InsertAt(0, Name & "  ")
            End If
        Case 4
            Event3 = EventName
            Name3 = Name
            Dim Canvas1 As Canvas
            Canvas1.Initialize(ActionBar)
            If lTitle.Text = ttl Or Canvas1.MeasureStringWidth(lTitle.Text, lTitle.Typeface, lTitle.TextSize) > 200dip Then
                If Landscape Then
                    ActionBar.AddView(iAction3, 100%x - 184dip, 4dip, 32dip, 32dip)
                    ActionBar.AddView(pAction3, 100%x - 192dip, 0dip, 48dip, 40dip)
                Else
                    ActionBar.AddView(iAction3, 100%x - 184dip, 8dip, 32dip, 32dip)
                    ActionBar.AddView(pAction3, 100%x - 192dip, 0dip, 48dip, 48dip)
                End If
                Dim str As String
                str = Icon
                iAction3.SetBackgroundImage(LoadBitmap(File.DirAssets, str))
                iAction3.Gravity = Gravity.FILL
                
            Else
                OverflowList.InsertAt(0, Name & "  ")
            End If
        Case 6
            Event4 = EventName
            Name4 = Name
            #Region Test
            Dim passed As Boolean
            passed = False
            If ttl = lTitle.Text Or lTitle.Text.Length > 16 Then
                If (100%x - pHome.Width - 48dip - (ActionBar.NumberOfViews - 7)/2*48dip) > 48dip Then
                    passed = True
                End If
            End If
            #End Region
            If passed Then
                If Landscape Then
                    ActionBar.AddView(iAction4, 100%x - 232dip, 4dip, 32dip, 32dip)
                    ActionBar.AddView(pAction4, 100%x - 240dip, 0dip, 48dip, 40dip)
                Else
                    ActionBar.AddView(iAction4, 100%x - 232dip, 8dip, 32dip, 32dip)
                    ActionBar.AddView(pAction4, 100%x - 240dip, 0dip, 48dip, 48dip)
                End If
                Dim str As String
                str = Icon
                iAction4.SetBackgroundImage(LoadBitmap(File.DirAssets, str))
                iAction4.Gravity = Gravity.FILL
            Else
                OverflowList.InsertAt(0, Name & "  ")
            End If
        Case 8
            Event5 = EventName
            Name5 = Name
            #Region Test
            Dim passed As Boolean
            passed = False
            If ttl = lTitle.Text Or lTitle.Text.Length > 16 Then
                If (100%x - pHome.Width - 48dip - (ActionBar.NumberOfViews - 7)/2*48dip) > 48dip Then
                    passed = True
                End If
            End If
            #End Region
            If passed Then
                If Landscape Then
                    ActionBar.AddView(iAction5, 100%x - 280dip, 4dip, 32dip, 32dip)
                    ActionBar.AddView(pAction5, 100%x - 288dip, 0dip, 48dip, 40dip)
                Else
                    ActionBar.AddView(iAction5, 100%x - 280dip, 8dip, 32dip, 32dip)
                    ActionBar.AddView(pAction5, 100%x - 288dip, 0dip, 48dip, 48dip)
                End If
                Dim str As String
                str = Icon
                iAction5.SetBackgroundImage(LoadBitmap(File.DirAssets, str))
                iAction5.Gravity = Gravity.FILL   
            Else
                OverflowList.InsertAt(0, Name & "  ")
            End If
        Case 10
            OverflowList.InsertAt(0, Name & "  ")
    End Select
End Sub

Private Sub Title_Resize
    Dim Canvas1 As Canvas
    Canvas1.Initialize(ActionBar)
    Dim width As Float
    width = Canvas1.MeasureStringWidth(lTitle.Text, lTitle.Typeface, lTitle.TextSize)
    Do While width > 100%x - 58dip - (ActionBar.NumberOfViews - 7)/2*48dip - 10dip - 48dip + Offset
        lTitle.Text = lTitle.Text.SubString2(0, lTitle.Text.Length - 2).Trim & "…"
        width = Canvas1.MeasureStringWidth(lTitle.Text, lTitle.Typeface, lTitle.TextSize)
    Loop
    lTitle.width = width +10dip
    pHome.width = 58dip + width + 10dip
    pHome.BringToFront
    HomeWidth = pHome.width
    pHome.Color = Colors.Transparent
    Offset = 0
End Sub

#Region Touch Events
Private Sub Home_onTouch(ViewTag As Object, Action As Int, X As Float, Y As Float, MotionEvent As Object) As Boolean
    pHome.Color = Slct
    Select Action
        Case 1
            pHome.Color = Colors.Transparent
            If Drwr = "Drawer" Then
                If NavDrawer.LeftOpen Then
                    PrevAction = "cClick"
                    NavDrawer.LeftOpen=False
                Else
                    PrevAction = "oClick"
                    NavDrawer.LeftOpen=True
                End If
            Else
                If Drwr = "Up" Then
                    CallSubDelayed(Main, "Up_Click")
                End If
            End If   
        Case 2
            If Drwr = "None" Then
            
            Else
                pHome.Color = Slct   
            End If
    End Select

    If Round2(Y, 0) > 48dip Then
        pHome.RemoveView
        If Landscape Then
            ActionBar.AddView(pHome, 0, 0dip, HomeWidth, 40dip)
        Else
            ActionBar.AddView(pHome, 0, 0dip, HomeWidth, 48dip)
        End If
        pHome.Color = Colors.Transparent
    End If
    
    If Round2(X, 0) > HomeWidth Then
        pHome.RemoveView
        If Landscape Then
            ActionBar.AddView(pHome, 0, 0dip, HomeWidth, 40dip)
        Else
            ActionBar.AddView(pHome, 0, 0dip, HomeWidth, 48dip)
        End If
        pHome.Color = Colors.Transparent
    End If
    
        If Round2(X, 0) < 0 Then
        pHome.RemoveView
        If Landscape Then
            ActionBar.AddView(pHome, 0, 0dip, HomeWidth, 40dip)
        Else
            ActionBar.AddView(pHome, 0, 0dip, HomeWidth, 48dip)
        End If
        pHome.Color = Colors.Transparent
    End If
End Sub

Private Sub Action1_onTouch(ViewTag As Object, Action As Int, X As Float, Y As Float, MotionEvent As Object) As Boolean
    pAction1.Color = Slct
    tLongPress.Enabled = True
    ToolTip = Name1
    Select Action
        Case 1
            pAction1.Color = Colors.Transparent
            tLongPress.Enabled = False
            CallSubDelayed(Main, Event1)           
    End Select

    If Round2(Y, 0) > 48dip Then
        pAction1.RemoveView
        If Landscape Then
            ActionBar.AddView(pAction1, 100%x - 96dip, 0dip, 48dip, 40dip)
        Else
            ActionBar.AddView(pAction1, 100%x - 96dip, 0dip, 48dip, 48dip)
        End If
        pAction1.Color = Colors.Transparent
        tLongPress.Enabled = False
    End If
    
    If Round2(X, 0) > 48dip Then
        pAction1.RemoveView
        If Landscape Then
            ActionBar.AddView(pAction1, 100%x - 96dip, 0dip, 48dip, 40dip)
        Else
            ActionBar.AddView(pAction1, 100%x - 96dip, 0dip, 48dip, 48dip)
        End If
        pAction1.Color = Colors.Transparent
        tLongPress.Enabled = False
    End If
    
        If Round2(X, 0) < 0 Then
        pAction1.RemoveView
        If Landscape Then
            ActionBar.AddView(pAction1, 100%x - 96dip, 0dip, 48dip, 40dip)
        Else
            ActionBar.AddView(pAction1, 100%x - 96dip, 0dip, 48dip, 48dip)
        End If
        pAction1.Color = Colors.Transparent
        tLongPress.Enabled = False
    End If
End Sub

Private Sub Action2_onTouch(ViewTag As Object, Action As Int, X As Float, Y As Float, MotionEvent As Object) As Boolean
    pAction2.Color = Slct
    tLongPress.Enabled = True
    ToolTip = Name2
    Select Action
        Case 1
            pAction2.Color = Colors.Transparent
            CallSubDelayed(Main, Event2)           
    End Select

    If Round2(Y, 0) > 48dip Then
        pAction2.RemoveView
        If Landscape Then
            ActionBar.AddView(pAction2, 100%x - 144dip, 0dip, 48dip, 40dip)
        Else
            ActionBar.AddView(pAction2, 100%x - 144dip, 0dip, 48dip, 48dip)
        End If
        pAction2.Color = Colors.Transparent
    End If
    
    If Round2(X, 0) > 48dip Then
        pAction2.RemoveView
        If Landscape Then
            ActionBar.AddView(pAction2, 100%x - 144dip, 0dip, 48dip, 40dip)
        Else
            ActionBar.AddView(pAction2, 100%x - 144dip, 0dip, 48dip, 48dip)
        End If
        pAction2.Color = Colors.Transparent
    End If
    
        If Round2(X, 0) < 0 Then
        pAction2.RemoveView
        If Landscape Then
            ActionBar.AddView(pAction2, 100%x - 144dip, 0dip, 48dip, 40dip)
        Else
            ActionBar.AddView(pAction2, 100%x - 144dip, 0dip, 48dip, 48dip)
        End If
        pAction2.Color = Colors.Transparent
    End If
End Sub

Private Sub Action3_onTouch(ViewTag As Object, Action As Int, X As Float, Y As Float, MotionEvent As Object) As Boolean
    pAction3.Color = Slct
    tLongPress.Enabled = True
    ToolTip = Name3
    Select Action
        Case 1
            pAction3.Color = Colors.Transparent
            CallSubDelayed(Main, Event3)           
    End Select

    If Round2(Y, 0) > 48dip Then
        pAction3.RemoveView
        If Landscape Then
            ActionBar.AddView(pAction3, 100%x - 192dip, 0dip, 48dip, 40dip)
        Else
            ActionBar.AddView(pAction3, 100%x - 192dip, 0dip, 48dip, 48dip)
        End If
        pAction3.Color = Colors.Transparent
    End If
    
    If Round2(X, 0) > 48dip Then
        pAction3.RemoveView
        If Landscape Then
            ActionBar.AddView(pAction3, 100%x - 192dip, 0dip, 48dip, 40dip)
        Else
            ActionBar.AddView(pAction3, 100%x - 192dip, 0dip, 48dip, 48dip)
        End If
        pAction3.Color = Colors.Transparent
    End If
    
        If Round2(X, 0) < 0 Then
        pAction3.RemoveView
        If Landscape Then
            ActionBar.AddView(pAction3, 100%x - 192dip, 0dip, 48dip, 40dip)
        Else
            ActionBar.AddView(pAction3, 100%x - 192dip, 0dip, 48dip, 48dip)
        End If       
        pAction3.Color = Colors.Transparent
    End If
End Sub

Private Sub Action4_onTouch(ViewTag As Object, Action As Int, X As Float, Y As Float, MotionEvent As Object) As Boolean
    pAction4.Color = Slct
    tLongPress.Enabled = True
    ToolTip = Name4
    Select Action
        Case 1
            pAction4.Color = Colors.Transparent
            CallSubDelayed(Main, Event4)           
    End Select

    If Round2(Y, 0) > 48dip Then
        pAction4.RemoveView
        If Landscape Then
            ActionBar.AddView(pAction4, 100%x - 240dip, 0dip, 48dip, 40dip)
        Else
            ActionBar.AddView(pAction4, 100%x - 240dip, 0dip, 48dip, 48dip)
        End If
        pAction4.Color = Colors.Transparent
    End If
    
    If Round2(X, 0) > 48dip Then
        pAction4.RemoveView
        If Landscape Then
            ActionBar.AddView(pAction4, 100%x - 240dip, 0dip, 48dip, 40dip)
        Else
            ActionBar.AddView(pAction4, 100%x - 240dip, 0dip, 48dip, 48dip)
        End If
        pAction4.Color = Colors.Transparent
    End If
    
        If Round2(X, 0) < 0 Then
        pAction4.RemoveView
        If Landscape Then
            ActionBar.AddView(pAction4, 100%x - 240dip, 0dip, 48dip, 40dip)
        Else
            ActionBar.AddView(pAction4, 100%x - 240dip, 0dip, 48dip, 48dip)
        End If
        pAction4.Color = Colors.Transparent
    End If
End Sub

Private Sub Action5_onTouch(ViewTag As Object, Action As Int, X As Float, Y As Float, MotionEvent As Object) As Boolean
    pAction5.Color = Slct
    tLongPress.Enabled = True
    ToolTip = Name5
    Select Action
        Case 1
            pAction5.Color = Colors.Transparent
            CallSubDelayed(Main, Event5)           
    End Select

    If Round2(Y, 0) > 48dip Then
        pAction5.RemoveView
        If Landscape Then
            ActionBar.AddView(pAction5, 100%x - 288dip, 0dip, 48dip, 40dip)
        Else
            ActionBar.AddView(pAction5, 100%x - 288dip, 0dip, 48dip, 48dip)
        End If
        pAction5.Color = Colors.Transparent
    End If
    
    If Round2(X, 0) > 48dip Then
        pAction5.RemoveView
        If Landscape Then
            ActionBar.AddView(pAction5, 100%x - 288dip, 0dip, 48dip, 40dip)
        Else
            ActionBar.AddView(pAction5, 100%x - 288dip, 0dip, 48dip, 48dip)
        End If
        pAction5.Color = Colors.Transparent
    End If
    
        If Round2(X, 0) < 0 Then
        pAction5.RemoveView
        If Landscape Then
            ActionBar.AddView(pAction5, 100%x - 288dip, 0dip, 48dip, 40dip)
        Else
            ActionBar.AddView(pAction5, 100%x - 288dip, 0dip, 48dip, 48dip)
        End If
        pAction5.Color = Colors.Transparent
    End If
End Sub

Private Sub Overflow_onTouch(ViewTag As Object, Action As Int, X As Float, Y As Float, MotionEvent As Object) As Boolean
    pOverflow.Color = Slct
    Select Action
        Case 1
            pOverflow.Color = Colors.Transparent
            OpenMenu           
    End Select

    If Round2(Y, 0) > 48dip Then
        pOverflow.RemoveView
        If Landscape Then
            ActionBar.AddView(pOverflow, 100%x - 48dip, 0dip, 48dip, 40dip)
        Else
            ActionBar.AddView(pOverflow, 100%x - 48dip, 0dip, 48dip, 48dip)
        End If
        pOverflow.Color = Colors.Transparent
    End If
    
    If Round2(X, 0) > 48dip Then
        pOverflow.RemoveView
        If Landscape Then
            ActionBar.AddView(pOverflow, 100%x - 48dip, 0dip, 48dip, 40dip)
        Else
            ActionBar.AddView(pOverflow, 100%x - 48dip, 0dip, 48dip, 48dip)
        End If
        pOverflow.Color = Colors.Transparent
    End If
    
        If Round2(X, 0) < 0 Then
        pOverflow.RemoveView
        If Landscape Then
            ActionBar.AddView(pOverflow, 100%x - 48dip, 0dip, 48dip, 40dip)
        Else
            ActionBar.AddView(pOverflow, 100%x - 48dip, 0dip, 48dip, 48dip)
        End If
        pOverflow.Color = Colors.Transparent
    End If
End Sub
#End Region

Private Sub OverflowInit(Items As List)
    Dim str As String
    str = Items.Get(0)
    If str.Length < 28 Then
    For i = 1 To Round2((28-str.Length)/2,0)
        str = str &    "  "
    Next
    Items.RemoveAt(0)
    Items.InsertAt(0, str)
    End If
    Items.AddAllAt(0, OverflowList)   
    For i=0 To Items.Size - 1
        sOverflow.Add(Items.Get(i))
    Next
    sOverflow.TextSize = 18
    If Thm = "Dark" Or LtTxt = True Then
        sOverflow.TextColor = Colors.White
        sOverflow.DropdownBackgroundColor = Colors.RGB(48,48,48)
    Else
        sOverflow.TextColor = Colors.Black
    End If
    
    sOverflow.Color = Colors.Transparent
    If Landscape Then
        ActionBar.AddView(sOverflow, 100%x - 40dip, 0dip, 0dip, 40dip)
    Else
        ActionBar.AddView(sOverflow, 100%x - 48dip, 0dip, 0dip, 48dip)
    End If
    sOverflow.SendToBack
End Sub

Private Sub OpenMenu
    Dim r As Reflector
    r.Target = sOverflow
    r.RunMethod("performClick")
End Sub

Private Sub sOverflow_ItemClick (Position As Int, Value As Object)
    Dim str As String
    str = Value
    If str.Length = str.Trim.Length + 2 Then
        CallSub(Main, str.Trim.Replace(" ", "_") & "_Click")
    Else
        CallSub2(Main, "Overflow_Click", str.Trim)
    End If
End Sub

Private Sub GetDrawable(Name As String) As Object
    Dim r As Reflector
    Dim package As String
    Dim id As Int
    package = r.GetStaticField("anywheresoftware.b4a.BA", "packageName")
    id = r.GetStaticField(package & ".R$drawable", Name)
    r.Target = r.GetContext
    r.Target = r.RunMethod("getResources")
    Return r.RunMethod2("getDrawable", id, "java.lang.int")
End Sub

Private Sub Drawer_DrawerSlide (Position As Float, DrawerGravity As Int)
    If Drwr = "Drawer" Then
        If PrevIndicator = "Up" Then
            If Position < 0.5 Then
                iDrawerIcon.Left = -14dip + (12dip * ( 0.5 - Position))
            End If   
        Else           
            If PrevState = "Closed" Then
                If PrevAction = "cClick" Then
                    iDrawerIcon.Left = -8dip -(6dip * Position)
                Else
                    PrevAction = "Swipe"
                    If Position < 0.5 Then
                        iDrawerIcon.Left = -14dip + (12dip * ( 0.5 - Position))
                    End If   
                End If
            Else
                If PrevAction = "oClick" Then
                    iDrawerIcon.Left = -8dip -(6dip * Position)
                Else
                    PrevAction = "Swipe"
                    If Position > 0.5 Then
                        iDrawerIcon.Left = -8dip -(12dip * (Position - 0.5))
                    End If           
                End If
            End If
        End If
    End If
End Sub

Private Sub Drawer_DrawerClosed(DrawerGravity As Int)
    PrevState = "Opened"
    lTitle.Text = SectionTitle
    Drwr = PrevIndicator
    Dim Bm2 As BitmapDrawable
    If Drwr = "Drawer" Then
        Bm2=GetDrawable("ic_drawer_" & Thm)
        iDrawerIcon.Bitmap=Bm2.Bitmap
        iDrawerIcon.Gravity = Gravity.CENTER_VERTICAL
    Else
        If Drwr = "Up" Then
            Bm2=GetDrawable("ic_up_" & Thm)
            iDrawerIcon.Bitmap=Bm2.Bitmap
            iDrawerIcon.Gravity = Gravity.CENTER_VERTICAL
        End If
    End If
    Offset = 24dip
    Title_Resize
End Sub

Private Sub Drawer_DrawerOpened(DrawerGravity As Int)
    PrevState = "Closed"
    lTitle.Text = AppTitle
    PrevIndicator = Drwr
    Drwr = "Drawer"   
    Dim Bm As BitmapDrawable   
    Bm=GetDrawable("ic_drawer_" & Thm)
    iDrawerIcon.Bitmap=Bm.Bitmap
    iDrawerIcon.Gravity = Gravity.CENTER_VERTICAL   
    iDrawerIcon.Left = -14dip
    Offset = 24dip
    Title_Resize
End Sub

Private Sub tLongPress_Tick
    Select ToolTip
        Case Name1
            temp = 1
            pAction1.RemoveView
            If Landscape Then
                ActionBar.AddView(pAction1, 100%x - 96dip, 0dip, 48dip, 40dip)
            Else
                ActionBar.AddView(pAction1, 100%x - 96dip, 0dip, 48dip, 48dip)
            End If
            pAction1.Color = Colors.Transparent
        Case Name2
            temp = 2
            pAction2.RemoveView
            If Landscape Then
                ActionBar.AddView(pAction2, 100%x - 144dip, 0dip, 48dip, 40dip)
            Else
                ActionBar.AddView(pAction2, 100%x - 144dip, 0dip, 48dip, 48dip)
            End If
            pAction2.Color = Colors.Transparent
        Case Name3
            temp = 3
            pAction3.RemoveView
            If Landscape Then
                ActionBar.AddView(pAction3, 100%x - 192dip, 0dip, 48dip, 40dip)
            Else
                ActionBar.AddView(pAction3, 100%x - 192dip, 0dip, 48dip, 48dip)
            End If       
            pAction3.Color = Colors.Transparent
        Case Name4
            temp = 4
            pAction4.RemoveView
            If Landscape Then
                ActionBar.AddView(pAction4, 100%x - 240dip, 0dip, 48dip, 40dip)
            Else
                ActionBar.AddView(pAction4, 100%x - 240dip, 0dip, 48dip, 48dip)
            End If
            pAction4.Color = Colors.Transparent
        Case Name5
            temp = 5
            pAction5.RemoveView
            If Landscape Then
                ActionBar.AddView(pAction5, 100%x - 288dip, 0dip, 48dip, 40dip)
            Else
                ActionBar.AddView(pAction5, 100%x - 288dip, 0dip, 48dip, 48dip)
            End If
            pAction5.Color = Colors.Transparent
    End Select
    CT.Show(ToolTip, 250, Bit.Or(Gravity.TOP, Gravity.RIGHT), 48dip*(temp + 0.4), 48dip)
    tLongPress.Enabled = False
End Sub
 
Upvote 0
Top