Android Question Load PDF pages in CustomListView - zoom enabled

Discussion in 'Android Questions' started by db0070, Mar 22, 2019.

  1. db0070

    db0070 Active Member Licensed User

    How can I show a multi page pdf in a CustomlistView and set each page so that the user is able to zoom the image?
    I also tried using Webview but it does not work:-
    Code:
    dim image as imageview
    Private CLV1 As CustomListView
    For i = 0 To pdf.PageCount-1        
            
    Dim p As B4XView = xui.CreatePanel("")
            p.SetLayoutAnimated(
    000, CLV1.AsView.Width,CLV1.AsView.Height)
            p.LoadLayout(
    "Card1")
            
    image.Bitmap = pdf.renderPageforDisplay(i)
            WebView1.SetBackgroundImage(
    image.Bitmap)
            CLV1.Add(p,WebView1)
    next
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    This is a mistake.

    Correct code: [B4X] Use WebView to show large images

    However it will probably won't work properly inside CLV as both views are scrollable. I suggest you to show a B4XDialog with the WebView when the user clicks on the item.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice