Measuring the view before rendering it and getting the remaining space (Android)

Iโ€™m trying to solve this problem in my age, but I canโ€™t find a solution: I need to know how much height the webview with some HTML text in it will take LinearLayout, if the occupied space should not exceed the screen size, I have to add another web View with different HTML text. I can't figure out how to do this, I tried calling measure (), but that would give me 0 of any measures I'm trying to use. Does anyone know how to do this? Thanks in advance.

+5
source share

All Articles