Hi,
I am able to load an image 1000x1000 pixels, on screen I can see the top of the image but never the bottom even when scrolling fullScroll bottom. My app is landscape only.
In the designer there is only a ScrollView2D
Unable to find an example for this case.
Serge
I am able to load an image 1000x1000 pixels, on screen I can see the top of the image but never the bottom even when scrolling fullScroll bottom. My app is landscape only.
B4X:
Sub play(id As Int)
Dim name As String
Dim pth As String
Dim speed As Int
Dim bmp As Bitmap
name = su.DecodeUrl(Starter.db.ExecQuerySingleResult("SELECT name FROM songlist WHERE ID = " & id), "UTF8")
pth = su.DecodeUrl(Starter.db.ExecQuerySingleResult("SELECT path FROM songlist WHERE ID = " & id), "UTF8")
speed = Starter.db.ExecQuerySingleResult("SELECT scrollspeed FROM songlist WHERE ID = " & id)
bmp.Initialize(pth, name)
Dim bw As Int = bmp.Width ' 1000
Dim bh As Int = bmp.Height ' 1000
Dim Ar As Double = bh/bw ' ratio of 1
ImageView.Initialize("")
ImageView.SetLayout(0dip, 0dip, 100%x, 100%x*Ar)
ImageView.Gravity = Bit.Or(Gravity.CENTER, Gravity.FILL)
ImageView.Bitmap = bmp
ScrollView2D.SetLayout(0, 0, 100%x, 100%x) ' *Ar)
ScrollView2D.Panel.Width = 100%x
ScrollView2D.Panel.Height = 100%y
ScrollView2D.Panel.AddView(ImageView, 0dip, 0dip, 100%x, 100%x*Ar)
ScrollView2D.FullScroll(1, True, True)
End Sub
In the designer there is only a ScrollView2D
Unable to find an example for this case.
Serge