Android Code Snippet [B4X] Use WebView to show large images

Discussion in 'Code Snippets' started by Erel, Feb 20, 2019.

  1. Erel

    Erel Administrator Staff Member Licensed User

    Tested on B4i And B4A.

    Depends on: XUI / iXUI and JavaObject.
    Private Sub ShowImage(Dir As String, FileName As String)
    #if B4A
    Dim jo As JavaObject = Me
    #End If
    $"<img src="${xui.FileUri(Dir, FileName)}"/>"$'xui is a global XUI object.
    End Sub

    #if Java
    public static void zoom(android.webkit.WebView wv) {
    #End If
    The inline java is required to start zoomed out.
  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