iOS Question how to make b4i animated gif in webView

Discussion in 'iOS Questions' started by Albi, Apr 16, 2015.

  1. Albi

    Albi Active Member Licensed User

    Hello,
    I followed this to get it to work for B4A.
    I can't get it to work for B4i - other html files open, so I don't know why this one doesn't.
    I've added the files to the files tab.
    I replaced the gif with a png and that works fine!
    When I try using a gif, there's just a small square (about 20 pixels in size) (just a grey border) at the top left of the webview. I waited to see if the gif needed time to load but it's not that big, and nothing happened.
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Can you upload the gif file?
     
  3. omidaghakhani1368

    omidaghakhani1368 Well-Known Member Licensed User

    Hi.
    Do you use File.Combine(File.DirAsset,picturename) in html code (in src for image)?
     
  4. Albi

    Albi Active Member Licensed User

    i've attached the gif here. the size is ok as far as i can tell, and it works fine with b4a
     

    Attached Files:

    • isis.gif
      isis.gif
      File size:
      118.8 KB
      Views:
      106
  5. Erel

    Erel Administrator Staff Member Licensed User

    Tested on iOS 8. It does work:

    upload_2015-4-17_9-40-15.png

    Code:
    WebView1.LoadUrl("file://" & File.Combine(File.DirAssets, "isis.gif"))
     

    Attached Files:

  6. Albi

    Albi Active Member Licensed User

    thanks. i'm still on iOS7. I imagine that is why.

    edit: actually, i'm a moron, missed a capital letter which is why it wasn't working!!!!11!!
     
    Last edited: Apr 17, 2015
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