android - Why change ListView cursor to null on stop? -


i've been looking @ examples of cursoradapter implementations make sure i'm doing right.

one thing i've noticed i'm not doing calling changecursor(null) on cursoradapter in activity's onstop() handler.

madapter.changecursor(null); 

what purpose of this? i'm willing if there's reason, hate navigating activity, backing activity, , seeing blank screen second until new cursor queried.

what purpose of this?

as falmarri suggests, cursor no longer tied adapter, , can close() cursor without problems. imho, not necessary call changecursor(null) in onstop(). particularly if manage cursor (startmanagingcursor() on activity), android take care of cursor respect activity lifecycle.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -