Android Question [ZoomImageView question] Automatically set image to a certain size and hide white background

aironium

Member
I'm trying to remake the PDA from S.T.A.L.K.E.R. especially its map component. I used the ZoomImageView library and upon loading, the map image is displayed with a white background and on almost fit on the screen:
Screenshot_20230219-130154.jpg

I tried loading the image with LoadBitmapResize, but yields the same result.

The aimed effect upon load of page (appear event) should end up like this:
Screenshot_20230219-124103.jpg

(or basically fit the image to the edges of the ZoomImageView (and lock it as the maximum zoom out size) and do not show the white background).

Current Snippet Used:
Loading of bitmap to zoomImageView:
Private Sub B4XPage_Created (Root1 As B4XView)
    Root = Root1
    Root.LoadLayout("page_map")
    mapZoomable.SetBitmap(LoadBitmap(File.DirAssets, "zone.png"))
End Sub

I assume there should be a different option for accomplishing the task, and I am currently looking for alternatives. I don't really know if ZoomImageView is the correct option in the first place.
 
Top