Getting WebView Content height once its loaded Android

后端 未结 1 1105
醉话见心
醉话见心 2020-12-31 21:34

I\'m trying to apply expand collapse feature on Webview Based on its Content height but i\'m always getting wrong value Here is my code

public class Mesure         


        
相关标签:
1条回答
  • 2020-12-31 22:10

    Use the following methods instead of getContentHeight() method:

    computeHorizontalScrollRange(); -> for width 
    computeVerticalScrollRange(); -> for height
    

    these two methods will return the entire scrollable width/height rather than the actual widht/height of the webview on screen

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