android - When to use getparent() -


in custom view need use getparent method , set visibility on of it's child views depending on custom view's state. problem want instantiate child views once. best place this?

thanks lot,

gratzi

i'm not sure want do. if of occurring in same activity screen why don't assign ids (e.g. android:id="@+id/someid" elements in layout.xml file.

this way can reference element programatically in code calling:

view someview = findviewbyid(r.id.someid); 

i unclear why need call getparent. if trying manipulate views in different activity think need use handler.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -