#Region Project Attributes
#MainFormWidth: 600
#MainFormHeight: 600
#End Region
Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Private pn,base As B4XView
Private bt As Button
Private xui As XUI
Private hide As Boolean = True
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.BackColor=fx.Colors.ARGB(200,30,30,30)
MainForm.Show
pn = xui.CreatePanel("")
pn.Color = xui.Color_Gray
pn.SetVisibleAnimated(2,True)
base = xui.CreatePanel("")
base.Color = xui.Color_ARGB(200,30,30,30)
base.SetVisibleAnimated(2,True)
MainForm.RootPane.AddNode(base,0,0,600,600)
MainForm.RootPane.AddNode(pn,-200,0,200,600)
bt.Initialize("bt")
bt.Text = "Setting"
base.AddView(bt,10,10,100,30)
End Sub
Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
Return True
End Sub
Sub bt_action
animatePane(pn,base)
End Sub
Sub animatePane(pna As B4XView,basea As B4XView)
If hide= False Then
hide= True
For i=0 To 200
pna.SetLayoutAnimated(200,-200,0,200,600)
basea.SetLayoutAnimated(200,0,0,600,600)
Next
Else
hide=False
For i=0 To 200
pna.SetLayoutAnimated(200,0,0,200,600)
basea.SetLayoutAnimated(200,200,0,600,600)
Next
End If
End Sub