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?

    e.g.:
    Code:
    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.
     
Loading...