'prepare update
Dim strMaxID As String = "0"
Starter.c = Starter.s.ExecQuery("select exm_id from tbl_exam order by exm_id desc limit 1")
If Starter.c.RowCount > 0 Then
Starter.c.Position = 0
strMaxID = Starter.c.GetString("exm_id")
End If
Dim dd As ServiceData
dd.EventName = "dd"
dd.Target = Me
dd.StringData = "4,1," & strMaxID
CallSubDelayed2(ReviewAmigo, "processService", dd)
Activity.Color = Colors.White
Dim imgBack As ImageView
imgBack.Initialize("")
imgBack.Bitmap = LoadBitmap(File.DirAssets,"study_anywhere.jpg")
imgBack.Gravity = Gravity.FILL
Activity.AddView(imgBack, 0, 0, 100%x, 100%y )
If pnlProgress.IsInitialized = False Then
pnlProgress.Initialize("pnlProgress")
pnlProgress.Color = Colors.ARGB(0,21,21,21)
pnlLoader.Initialize("pnlLoader")
pnlLoader.Color = Colors.ARGB(200,255,0,0)
Dim cd As ColorDrawable
cd.Initialize2(Colors.ARGB(200,255,0,0),3dip,1dip,Colors.darkGray)
pnlLoader.Background = cd
li1.Initialize(22)
li1.IndicatorColor = Colors.ARGB(200,255,255,255)
pnlLoader.AddView(li1,10dip ,10dip,80dip,80dip)
pnlProgress.AddView(pnlLoader,(100%x/2) - 50dip ,(100%y/2) - 50dip ,100dip,100dip)
Activity.AddView(pnlProgress,0 ,0 ,100%x,100%y)
End If
If pnlProgress.IsInitialized Then pnlProgress.BringToFront
'DoEvents
showProgress(True)
'Activity Specific
Activity.LoadLayout("main_page")
pnlMain.LoadLayout("main_page_info")
scv1.Panel.LoadLayout("main_page_menu")
ActionBar.SetAsActionBar
ActionBar.TitleTextColor = Colors.White
ActionBar.Color =Colors.RGB(255,152,0)
ActionBar.Title = "Review Amigo"
ActionBar.SubTitleTextColor =Colors.White
ActionBar.SubTitle =""
ActionBar.InitMenuListener
bd = xml.GetDrawable("ic_menu_white_24dp")
ActionBar.NavigationIconDrawable = bd
ActionBar.InitMenuListener
DoEvents
Dim strSQL As String = "select * from tbl_user limit 1"
Starter.c = Starter.s.ExecQuery(strSQL)
If Starter.c.RowCount > 0 Then
Starter.c.Position = 0
Starter.oEmail = Starter.c.GetString("u_email")
Starter.oLName = Starter.c.GetString("u_lname")
Starter.oFName = Starter.c.GetString("u_fname")
Else
Starter.oEmail = ""
Starter.oLName = "dela Cruz"
Starter.oFName = "Juan"
End If
DoEvents
If File.Exists(File.DirDefaultExternal,"pic.png") = True Then
Starter.bmp1 = LoadBitmap(File.DirDefaultExternal,"pic.png")
Else
Starter.bmp1 = LoadBitmap(File.DirAssets,"profile3.jpg")
End If
DoEvents
If Utils.Connected Then
If Common.Facebook.Connected Then
DoEvents
Dim dd As ServiceData
dd.EventName = "dd"
dd.Target = Me
dd.StringData = "http://graph.facebook.com/" & Starter.fbID & "/picture?width=100&height=100"
Dim job As HTTPJob
job.Initialize("j", Me)
Dim tag As SJTag
tag.Initialize
tag.data = dd
job.tag = tag
job.Download("http://graph.facebook.com/" & Starter.fbID & "/picture?width=100&height=100")
Else
PDB1.Initialize(Starter.bmp1)
MSP1.withName(Starter.oFName & " " & Starter.oLName).withEmail("Future Nurse").withIcon(PDB1)
builDrawer
End If
Else
PDB1.Initialize(Starter.bmp1)
MSP1.withName(Starter.oFName & " " & Starter.oLName).withEmail("Future Nurse").withIcon(PDB1)
builDrawer
End If
DoEvents
'main page menu
btn1.Typeface = Starter.fa
btn1.Text = Chr(0xf044)
btn2.Typeface = Starter.fa
btn2.Text = Chr(0xf096)
btn3.Typeface = Starter.fa
btn3.Text = Chr(0xf280)
btn4.Typeface = Starter.fa
btn4.Text = Chr(0xf02e)
btn5.Typeface = Starter.fa
btn5.Text = Chr(0xf080)
btn6.Typeface = Starter.fa
btn6.Text = Chr(0xf013)
scv1.Panel.Height = btn6.Top + btn6.Height + 100dip
If pnlProgress.IsInitialized Then pnlProgress.BringToFront