How would I remove all child views from a widget? For example, I have a GridView and I dynamically inflate many other LinearLayouts into it; later in my application I am looking to start fresh with that GridView and clear all of its child Views. How would I do this? TIA.
Share
works for any viewGroup. in your case it is GridView.
http://developer.android.com/reference/android/view/ViewGroup.html#removeAllViews()