Android: Image width inside a webview -
i have simple webview inside image
i want set width attribute of image tag "90%" if size image > of device width
my displaymetrics says screen dimesions 720x1220 , correct.
displaymetrics{density=2.0, width=720, height=1220, scaleddensity=2.0, xdpi=320.0, ydpi=320.0}
now image 600x300 code skip image when rendered runtime image big , go outside screen dimensions (so webview shows horizontal bar).
seems the webview (vewport??) works in dpi , not pixel, need test if image > 300 px resize image
there way know dimension of viewport in pixel ?
your html being zoomed webview
. try this.
<meta name="viewport" content="target-densitydpi=device-dpi, width=device-width" />
http://developer.android.com/guide/webapps/targeting.html#viewportdensity
Comments
Post a Comment