Good morning,
after modifying the manifest file and inserting ACToolBarLight1 in an old app when I run in debug I get the error allengato, instead if I compile it it works
Thaks
Marco
after modifying the manifest file and inserting ACToolBarLight1 in an old app when I run in debug I get the error allengato, instead if I compile it it works
Thaks
Marco
B4X:
** Activity (main) Create, isFirst = true **
Error occurred on line: 113 (Main)
java.lang.RuntimeException: java.lang.RuntimeException: Cannot convert: class anywheresoftware.b4a.objects.ButtonWrapper, to: class anywheresoftware.b4a.objects.PanelWrapper
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:170)
at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)
at B4A.SendTime.main._activity_create(main.java:512)
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.SendTime.main.afterFirstLayout(main.java:105)
at B4A.SendTime.main.access$000(main.java:17)
at B4A.SendTime.main$WaitForLayout.run(main.java:83)
at android.os.Handler.handleCallback(Handler.java:900)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loop(Looper.java:219)
at android.app.ActivityThread.main(ActivityThread.java:8347)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1055)
Caused by: java.lang.RuntimeException: Cannot convert: class anywheresoftware.b4a.objects.ButtonWrapper, to: class anywheresoftware.b4a.objects.PanelWrapper
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:409)
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:453)
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:453)
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:148)
... 18 more
** Activity (main) Resume **
B4X:
Activity.LoadLayout("main")
ToolbarHelper.Initialize
ToolbarHelper.ShowUpIndicator = True 'set to true to show the up arrow
Dim bd As BitmapDrawable
bd.Initialize(LoadBitmap(File.DirAssets, "hamburger.png"))
ToolbarHelper.UpIndicatorDrawable = bd
ACToolBarLight1.InitMenuListener
sm.Initialize("sm")
Dim offset As Int = 100dip
sm.BehindOffset = offset
sm.Mode = sm.LEFT
Dim lftMenu As Panel
lftMenu.Initialize("")
sm.Menu.AddView(lftMenu, 0, 0, 100%x - offset, 100%y)
lftMenu.LoadLayout("Left")
For i = 1 To 30
ListView1.AddSingleLine("Item " & i)
Next
B4X:
AddManifestText(
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="19"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.
SetApplicationAttribute(android:theme, "@style/MyAppTheme")
CreateResource(values, theme.xml,
<resources>
<style name="MyAppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">#0098FF</item>
<item name="colorPrimaryDark">#007CF5</item>
<item name="colorAccent">#AAAA00</item>
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="android:windowTranslucentNavigation">false</item>
<item name="android:windowTranslucentStatus">true</item>
</style>
</resources>
)