android - Finding out if the content of a webview is smaller than the webview itself -
i trying find out if content in webview smaller size of webview itself.(essentially no vertical scrollbar)
on looking around found (webview.getcontentheight()*getresources().getdisplaymetrics().density )< webviewheight.getmeasuredheight())
but keep getting 0 both when try , log it.
@override public void onpagefinished(webview webview, string url) { super.onpagefinished(webview, url); log.i("scrolltest page finished",":"+ marticleview.isverticalscrollbarenabled()); log.i("heighttest page finished", ":"+( marticleview.getcontentheight()*getresources().getdisplaymetrics().density )+"<"+ marticleview.getheight()); } i true isverticalscrollbarenabled , keep getting zeros heights, doing wrong? there simpler way find out if content of webview smaller height?
note:- marticleview here webview.
Comments
Post a Comment