java - Is there a way to find all View.GONE elements on a page? -


i have android application i'm hiding , showing different custom items on page. there way loop through items on page set view.gone or going have if each id?

thanks lot

to find hidden views, can like:

    linearlayout parentlayout = (linearlayout) findviewbyid(r.id.parent_layout);      int childviews = parentlayout.getchildcount();     list<view> hiddenviews = new arraylist<view>();      (int = 0; < childviews; i++) {         view v = parentlayout.getchildat(i);         if (v.getvisibility() == view.gone) {             hiddenviews.add(v);         }     } 

in example, list<view> hiddenviews contain views visibility of view.gone.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -