MapFragmentActivity

338 views
Skip to first unread message

Alex

unread,
Jun 16, 2011, 12:53:05 PM6/16/11
to android-support-v4...@googlegroups.com
Hi,

Nice work, I use it in my app :-)

I was wondering if it is possible to keep the original compatibility pack and just have a new MapActivityFragment in your pack ?
It may not be a good idea to extends all application activities with MapActivity (since some users have problems with it, I'm thinking about all the chinese tablet out there). 

++
Alex

Pete Doyle

unread,
Jun 16, 2011, 5:15:05 PM6/16/11
to android-support-v4...@googlegroups.com
Hi Alex,
Thanks :)  Glad its helpful for you.  

Currently I haven't done the work to create a separate FragmentActivity and MapFragmentActivity.  It is possible by refactoring some code inside FragmentActivity (such that the common code can be shared with MapFragmentActivity).  Its not technically possible to use the original compatibility pack (i.e. the *jar* that was shipped) since we have to modify FragmentActivity.  I'm guessing that probably doesn't matter to you though...

Personally, I have just shoved everything into one FragmentActivity so far.  I'm sure there's a downside to that, but I'm not sure what it is yet. :)

Thanks,
Pete

Alex

unread,
Jun 17, 2011, 1:14:13 PM6/17/11
to android-support-v4...@googlegroups.com
OK, so I have another problem... my MapView can only be show once !
Like you suggest on google code, my MapView is created in my
MapActivity and pass to fragment everytime it is created, but it shows
only the first time I select it.

Any advise ? :-)

Alex

unread,
Jun 17, 2011, 1:31:36 PM6/17/11
to android-support-v4...@googlegroups.com
Found the problem :-)
Removed the view in onDestroyView(), and recreate my fragment each
time it is called (rather than reuse it).

++
Alex

Reply all
Reply to author
Forward
0 new messages