How to get height of LinearLayout

前端 未结 3 995
广开言路
广开言路 2020-12-11 01:51

I have a LinearLayout set height as match_parent as below:



        
3条回答
  •  情书的邮戳
    2020-12-11 02:35

    You need to wait View to be initialized first use View Tree Observer it waits until the view is created check out this

    get layout height and width at run time android

提交回复
热议问题