Hello,
I am following the below example to integrate Bottom Drawer at B4Xpages.
https://www.b4x.com/android/forum/threads/bottom-popup-drawer.111706/#content
While integration I am facing the below error:
The below is the Code base :
Please advice
Thanks
I am following the below example to integrate Bottom Drawer at B4Xpages.
https://www.b4x.com/android/forum/threads/bottom-popup-drawer.111706/#content
While integration I am facing the below error:
B4X:
Error occurred on line: 263 (B4XMainPage)
java.lang.RuntimeException: Object should first be initialized (B4XView).
at anywheresoftware.b4a.AbsObjectWrapper.getObject(AbsObjectWrapper.java:67)
at anywheresoftware.b4a.objects.B4XViewWrapper.asViewWrapper(B4XViewWrapper.java:88)
at anywheresoftware.b4a.objects.B4XViewWrapper.getHeight(B4XViewWrapper.java:144)
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:348)
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.debug.Debug.delegate(Debug.java:262)
at b4a.example.b4xmainpage._showpanel(b4xmainpage.java:385)
at b4a.example.b4xmainpage$ResumableSub_B4XPage_Appear.resume(b4xmainpage.java:124)
at b4a.example.b4xmainpage._b4xpage_appear(b4xmainpage.java:74)
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$2.run(BA.java:387)
at android.os.Handler.handleCallback(Handler.java:873)
The below is the Code base :
B4X:
Sub CreatePanel
Root.LoadLayout("MainPage")
Overlay = xui.CreatePanel("overlay")
Overlay.Visible = False
Dim p As Panel = Overlay
p.Elevation = 5dip
Root.AddView(Overlay, 0, 0, 100%x, 100%y)
Overlay.LoadLayout("Overlay")
pnlBottom.LoadLayout("Layout1")
pnlBottom.SetColorAndBorder(xui.Color_Red, 0, 0, 15dip)
End Sub
Sub showPanel
Dim Duration As Int = 300
Overlay.SetVisibleAnimated(Duration, True)'OverlayVisible
Dim pnlBottomVisibleHeight As Int = pnlBottom.Height - 8dip 'hide bottom round corners
pnlBottom.SetLayoutAnimated(0, 0, pnlBottom.Parent.Height, pnlBottom.Width, pnlBottom.Height)
pnlBottom.SetLayoutAnimated(Duration, 0, pnlBottom.Parent.Height - pnlBottomVisibleHeight, pnlBottom.Width, pnlBottom.Height)
End Sub
Please advice
Thanks