:) My RadioGroup's RadioButtons get dynamically created from an ArrayList (which resides in my main activity) full of links like so:
ArrayList = { "hxxp://helloworld.com", "hxxp://helloworld2.net", ..., "hxxp://whatever.com" }
then I have a new class called "links" that gets called from a menu button in my main activity which sets a nice layout with a radiobubtton per link (in a scrollview) and a "go!" button on the bottom of the page (relative layout).
This all works great except for one thing. If you exit the application using the back button, and go back into the application by clicking on the icon in the Android menu, you get to the main activity, then click the "links" button in the menu and they are doubled each time. ??? like so:
link 0
link 1
link 2
link 0 (again)
link 1 (again)
link 2 (again)
This appends the links to the bottom each time you come back to the "links" activity from leaving. Is there some way I can call a method to clear all radio buttons generated form the last session in the links activity before putting them into the RadioGroup? I tried changing my onPause()
to finish();
I tried freeing the cache with RadioGroup.destroyDrawingCache();
nothing seems to do it.