Android Question Text Reflow with Program-Rendered HTML in WebViews...

Discussion in 'Android Questions' started by Sterling, Jun 17, 2015.

  1. Sterling

    Sterling New Member Licensed User

    Hey all,

    I'm writing an app that builds HTML and then loads it into a WebView. In Android pre-KitKat, text reflow is automatic (and existent), but I'm trying to come up with a solution that also works in KitKat. I'm using the "viewport" metatag in the rendered HTML, but it doesn't seem to work. Does a WebView ignore this tag? Is there another reliable way to get text reflow to work by formatting the HTML document in a certain way?

    Dim HTMLHeader as String
    HTMLHeader = 
    "<html><head><meta name=""viewport"" content=""initial-scale=1, width=device-width""></head>"
    Any help is appreciated :) Thanks!
  2. NJDude

    NJDude Expert Licensed User

    The ViewPort tag works on any version, but it has to be part of the HTML.
  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