ایجاد یک اسکرول ویو و خواندن تصویر از دیتا بیس در اندرویدمثل اینستا گرام
If File.Exists(File.DirInternal, "mymobail")=False Then
File.Copy(File.DirAssets,"mymobail",File.DirInternal,"mymobail")
End If
Dim SQL1 As SQL
SQL1.Initialize(File.DirInternal, "mymobail", True)
Dim sc As ScrollView
sc.Initialize (0)
Activity.AddView(sc,0,0,100%x,100%y)
Dim top As Int=5dip
Dim cursor As Cursor
cursor = SQL1.ExecQuery("SELECT * FROM mobail")
For i = 0 To cursor.RowCount - 1
cursor.Position = i
Log(cursor.GetString("aks"))
Dim img As ImageView
img.Initialize ("")
sc.Panel.AddView(img,0,top,300dip,300dip)
img.Bitmap = LoadBitmap(File.DirAssets, cursor.GetString("aks"))
img.Gravity =Gravity.FILL
top=top+img.Height +10dip
Next
sc.Panel.Height =top
sc.Panel .Color =Colors.White
If File.Exists(File.DirInternal, "mymobail")=False Then
File.Copy(File.DirAssets,"mymobail",File.DirInternal,"mymobail")
End If
Dim SQL1 As SQL
SQL1.Initialize(File.DirInternal, "mymobail", True)
Dim sc As ScrollView
sc.Initialize (0)
Activity.AddView(sc,0,0,100%x,100%y)
Dim top As Int=5dip
Dim cursor As Cursor
cursor = SQL1.ExecQuery("SELECT * FROM mobail")
For i = 0 To cursor.RowCount - 1
cursor.Position = i
Log(cursor.GetString("aks"))
Dim img As ImageView
img.Initialize ("")
sc.Panel.AddView(img,0,top,300dip,300dip)
img.Bitmap = LoadBitmap(File.DirAssets, cursor.GetString("aks"))
img.Gravity =Gravity.FILL
top=top+img.Height +10dip
Next
sc.Panel.Height =top
sc.Panel .Color =Colors.White