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

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

android - How to create dynamically Fragment pager adapter -

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