简体   繁体   中英

Android WebView : how do I control webView height?

I am developping an android apps and I want to comunicate with the users giving them some informations as admob ads. I want to use "WebView" and to fix its height to "50dp". How do i fix the height from the server (html fille or css) to fit exactly the "50dp" on the client (no verticall scrolling). Thank you

For a dynamic height in your WebView, you can set the width of your WebView to wrap_content (this is the device part).
Then load a proper html which has a fixed height (this is the server part).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM