WebView doesn't resize

后端 未结 2 990

I\'ve developed a web application for Firefox OS, but I wanted to make it run \"natively\" in Android. My application consists of a dialogue box that is a div w

相关标签:
2条回答
  • 2021-01-18 10:59

    That's not exactly the answer to your question, but you will also notice that WebView does re-size when it's about getting bigger, but doesn't reduce when the content's height decreases, as I have already answered on this question: WebView height = wrap_content with changing font size doesn't work

    The bug/feature is referenced on Google's issue tracker: https://code.google.com/p/android/issues/detail?id=18726

    Please don't blame me, I just wanted to point that for further problems you could encounter with WebView.

    0 讨论(0)
  • 2021-01-18 11:19

    The problem turned out to be that I was using position: absolute inside a position: fixed div. The outer div was resizing properly, but the inner one was not. The reason I had to use position: absolute was because there is a bug in WebKit which means that you cannot transform fixed positioned divs.

    0 讨论(0)
提交回复
热议问题