My app "360 ALP PANORAMI" ( https://play.google.com/store/apps/details?id=alpvir.panorami ) displays 360 degree panoramas of snow-capped mountains and provides an aid to recognition of the peaks through appropriate labels.The views (those in version HD) are images occupying from 2 to 4 MB, have dimensions of the order of 20.000x1200 pixels, are displayed in the scale 1:1 and can be shaken in the 4 directions; there is NOT a zoom.
The code behind this view is largely inspired by what is written in a very old post (https://www.b4x.com/android/forum/threads/360-degrees-landscape.16414/#post94705) from Warwound and It uses the excellent library GestureDetector by Informatix to manage the movement in 4 directions of the image.
Below carry a piece of code that loads the big image.
Also use the Ricicla function that should free up memory.
Everything works as designed by me but is reported to me that in a Samsung A5 displays 1 or 2 panoramas in a completely abnormal (see image). Even in an old Motorola with Android 2.3.3 happen the same thing, but this might be excusable given the old and poor equipment of this smartphone.
This image is the result of a photograph taken with an ordinary camera at Samsung smartphones because on the occasion of this malfunction also the mechanism to create a screenshot does not work.
Also I think I can say that it also creates an ANR that I enclose
How do I attach one screnshot comparison of a screen during normal operation of the app.
How to overcome this serious malfunction ?
Thanks for the attention
The code behind this view is largely inspired by what is written in a very old post (https://www.b4x.com/android/forum/threads/360-degrees-landscape.16414/#post94705) from Warwound and It uses the excellent library GestureDetector by Informatix to manage the movement in 4 directions of the image.
Below carry a piece of code that loads the big image.
B4X:
BMP.Initialize(File.DirRootExternal , NameOfFileJPG)
intAltImg=BMP.Height : intLargImg = BMP.Width
Panel1.Initialize("")
Activity.AddView(Panel1, 0, 0, 100%x, 100%y)
Canvas1.Initialize(Panel1)
DestRect.Initialize(CurrentX, CurrentY, intLargImg-CurrentX, intAltImg-CurrentY)
SrcRect.Initialize(0, 0, intLargImg, intAltImg)
Also use the Ricicla function that should free up memory.
B4X:
Sub Ricicla
If BMP.IsInitialized Then
Dim Obj1 As Reflector
Obj1.Target = BMP
Obj1.RunMethod("recycle")
BMP = Null
End If
End Sub
Everything works as designed by me but is reported to me that in a Samsung A5 displays 1 or 2 panoramas in a completely abnormal (see image). Even in an old Motorola with Android 2.3.3 happen the same thing, but this might be excusable given the old and poor equipment of this smartphone.
This image is the result of a photograph taken with an ordinary camera at Samsung smartphones because on the occasion of this malfunction also the mechanism to create a screenshot does not work.
Also I think I can say that it also creates an ANR that I enclose
How do I attach one screnshot comparison of a screen during normal operation of the app.
How to overcome this serious malfunction ?
Thanks for the attention
Attachments
Last edited: