To view a 360 degrees landscape (8000x600 pixels around) I thought it best to use the schema in the attached drawing.
Two identical images (color black) are loaded in 2 ImageView (color red).
A HorizzontalScrollView (color blue) embraces the two ImageView.
Smartphone screen (color green) show only a small part of HorizzontalScrollView.
Here's the code I used:
But I believe that this system does not eat up many resources and above all allows seamless navigation. There are shots in the management of the scroll, it is not smooth.
Does anyone have any suggestions for improving the situation?
Thanks in advance.
Two identical images (color black) are loaded in 2 ImageView (color red).
A HorizzontalScrollView (color blue) embraces the two ImageView.
Smartphone screen (color green) show only a small part of HorizzontalScrollView.
Here's the code I used:
B4X:
HS.Initialize (LargImg * 2, "HS")
IV1.Initialize ("")
IV2.Initialize ("")
IV1.Gravity = Gravity.FILL
IV2.Gravity = Gravity.Fill
Activity.AddView (HS, 0, 0, 100% x, y 100%)
BMP.Initialize (File.DirRootExternal, Main.FileName)
IV1.Bitmap = BMP
IV2.Bitmap = BMP
HS.Panel.AddView (IV1, 0.0, LargImg, 600)
HS.Panel.AddView (IV2, LargImg, 0, LargImg, 600)
But I believe that this system does not eat up many resources and above all allows seamless navigation. There are shots in the management of the scroll, it is not smooth.
B4X:
Sub HS_ScrollChanged (Position As Int)
'--- Scroll right
If Position> * 1.5 Then LargImg
HS.ScrollPosition = LargImg / 2
else
'--- Left scroll
If Position <LargImg / 2 Then
HS.ScrollPosition LargImg * 1.5 =
end If
end If
end Sub
Does anyone have any suggestions for improving the situation?
Thanks in advance.