Monday, May 2, 2011

[android-developers] Re: Fragments for Google Maps add on?

You cannot replace a fragment (e.g. your ImageView fragment) directly with an activity (in your case a subclass of AFragmentMapActivity). Don't confuse Activities with Fragments.

Have your main Activity, that hosts the Map fragment (and possibly other fragments as well), extend AFragmentMapActivity. In my example that is 'Main'.
Then inflate in your main Activity a layout with a <fragment> that contains a MapView. In my example that is 'MapFragment'.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate