views:

27

answers:

1

I am dynamically adding ImageViews to a RelativeLayout depending on user input. I have also created a button that when pressed, should clear all of the content of that RelativeLayout (remove all children). I was hoping for a .clear() method, but no such luck.

can someone point me in the right direction here?

RelativeLayout rel = (RelativeLayout) findViewById(R.id.iv_section);
rel.SomethingToRemoveAllChildren();

thanks.

+1  A: 

ViewGroup.removeAllViews()

totramon
perfect thanks...figured it'd be something easy like that :)
Kyle