Want to get width of View(LinearLayout) at Runtime in Android -


how can dynamic width of linearlayout @ runtime?

i mean, want width of linearlayout @ runtime , when linearlayout visibility "gone" , linearlayout width "match_parent" in xml layout file.

i can width using ongloballayoutchangelistener , onpredrawlistener if our view(linearlayout) "visible" state, not @ "gone" state.

is here solution problem?

thank time.

simply fetch reference linearlayout lets call "ll" , call "ll.getwidth()" gives thewidth in pixels...


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -