Dim overlayPanel as Panel
overlayPanel.Initialize("")
overlayPanel.Color = Colors.ARGB(170,30, 30, 30)
getCurrentActivity.AddView(overlayPanel,0,0,100%x,100%y)
overlayPanel.Visible = False
Dim jo As JavaObject = sm
Dim event As Object = jo.CreateEventFromUI("com.jeremyfeinstein.slidingmenu.lib.SlidingMenu$OnOpenListener", "Open", Null)
jo.RunMethod("setSecondaryOnOpenListner", Array(event)) 'setSecondaryOnOpenListner
Dim jo As JavaObject = sm
Dim event As Object = jo.CreateEventFromUI("com.jeremyfeinstein.slidingmenu.lib.SlidingMenu$OnCloseListener", "Close", Null)
jo.RunMethod("setOnCloseListener", Array(event))
Sub Close_Event (MethodName As String, Args() As Object) As Object
overlayPanel.SetVisibleAnimated(500,False)
End Sub
Sub Open_Event (MethodName As String, Args() As Object) As Object
overlayPanel.SetVisibleAnimated(500,True)
End Sub
Sub getCurrentActivity As Activity
Dim r As Reflector
r.Target = r.GetActivityBA
Return r.GetField("vg")
End Sub