MapActivity with the loader platform

Is there any solution for using a MapView (and therefore MapActivity ) with the pre-3.0 Loader cellular library (and therefore FragmentActivity )?

(As an aside, I never understood why MapActivity needs to be expanded in order to use a map - this is terribly limiting when writing generic actions. Wouldn’t the interface be more convenient?)

+4
source share
1 answer

In a Carter Jernigan statement, received out of range, I ended up taking the source of the compatibility library and putting a copy of everything in the android.support.v4.app package in my source tree in the android.support.v4_map.app package. Then I changed the FragmentActivity inherit from MapActivity instead of Activity and named it MapFragmentActivity . This is a pretty crude hack, but it works well (so far). Now I have all the benefits of LoaderManager .

As an aside, trying to use a CursorLoader without a LoaderManager is a recipe for many open cursors.

+4
source

All Articles