android - When to use ViewStub vs Inflate? -


the article http://android-developers.blogspot.in/2009/03/android-layout-tricks-3-optimize-with.html talks when use view. did not find use case should replace inflate viewstub. didnot see performance improvements when replaced inflate viewstub.

essentially viewstubs offer way of doing things, or "achieving goal". find you'll learn use them when stuck , looking or option. otherwise if code doing want correctly without viewstubs, forget them time being. there no point forcing use options when don't need them.

viewstubs, in own words, "use once", temporary type of view holder. use them when want become visible on screen activity's current life cycle.

there other way can accomplish that, viewstubs lightweights , offer different set of pros , cons compared normal view objects.


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -