jtoolsdev wrote: > I have a ListView in my application that uses a Custom Adapter. It's > uses TextViews where I am able to set the color. The Custom Adapter > is based on examples in the ApiDemo and examples elsewhere. However > in none of those examples did I find how to clear the adapter since > the data for that ListView will change when the user inputs new data.
That's because it varies by adapter type. You would call requery() on the underlying Cursor of a CursorAdapter, for example. > Will the old one be destroyed with the > call for a new Adapter is made like this? > > // lv is the ListView > lv.setAdapter( new MyCustomAdapter(this)); The old adapter will get garbage-collected as soon as all references to it are released. Android should not be holding onto your former adapter instance after your call shown above, so if you're not holding onto it, it should go away shortly. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, $35/Year -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

