B4i Library Zoomable ImageView

Descartex

Well-Known Member
Licensed User
Longtime User
Simply perfect.
Thanks in tons!!!
 

Alberto Iglesias

Well-Known Member
Licensed User
Longtime User
Hello Narek,

What is wrong in this code? I can´t see the picture

B4X:
    NavControl = Nav
    Page1.Initialize("Page1")
    Page1.Title = "Page 1"
    Page1.RootPanel.Color = Colors.White
    NavControl.ShowPage(Page1)
  
   imgZoom.Initialize(LoadBitmap(File.DirAssets,"Alberto.JPG"))
   imgZoom.MinScale = 1
   imgZoom.MaxScale = 10.0
   imgZoom.UnZOOMonDoubleTap = True
   imgZoom.AddToView(Page1.RootPanel, 0, 0, Page1.RootPanel.Width, Page1.RootPanel.Height)

Thanks
 

narek adonts

Well-Known Member
Licensed User
Longtime User

I think you should not add the view in appstart as page.width and height should be 0
 

Graham Bancroft

Member
Licensed User
Longtime User
ZoomedImage
Narek, I have the following issue, when I Zoom I want the Whole Image viewable/Scrollable, so that I can read small text. I can only view less and less moving up to upper left of image. In my B4a App, the whole image is Zoomed larger and available by scrolling left/right or up/down
see attached problem.png

Private Sub Application_Start (Nav As NavigationController)
NavControl = Nav
Page1.Initialize("Page1")
Page1.Title = "Page 1"
Page1.RootPanel.Color = Colors.White
NavControl.ShowPage(Page1)
'imgZoom.Initialize(Null)
imgZoom.Initialize(LoadBitmap(File.DirAssets,"appendix1a.jpg"))
imgZoom.AddToView(Page1.RootPanel,0,0,100%x,100%y)
'imgZoom.Bitmap= YourBitmap
End Sub
Private Sub Page1_Resize(Width As Int, Height As Int)
End Sub

I am using your libImageZoom from above. Regards Graham
 

Attachments

  • problem.png
    143.2 KB · Views: 27
Cookies are required to use this site. You must accept them to continue using the site. Learn more…