android - RelativeLayout check runtime if is removed or not -


in activity changing 1 of viewgroup content runtime: buttons action, other events.

at specific case need check if child in layout or not ( in case child relativelayout, hold other views)

how can check runtime, programmatically if child_1_relativelayout there or removed view tree, parent parentrelativelayout

the getparent() usefully? - not explanation how use it, thanks.

in case have stored views can use getparent() check if view direct child other view. after removing view parent field cleared. example:

viewgroup parent = ...; view child = ...;  assert(child.getparent() == parent); // <-- true  parent.removeview(child);  assert(child.getparent() == parent); // <-- false 

Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -