Android Question Serious anomaly in the view of a very large image

AlpVir

Well-Known Member
Licensed User
Longtime User
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.

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

  • Pano_anomalous.jpg
    Pano_anomalous.jpg
    47.6 KB · Views: 305
  • Pano_OK.jpg
    Pano_OK.jpg
    75.7 KB · Views: 291
  • crashes_crashes_alpvir.panorami_201612.csv.zip
    850 bytes · Views: 245
Last edited:

AlpVir

Well-Known Member
Licensed User
Longtime User
The suggestion is decisive !
The 5 first views that you could not see properly now can be displayed.
Many many thanks!
 
Upvote 0
Top