Reputation: 2059
I have this application I want to upgrade from Google maps API 1.0 to the 2.0 especially for some performances issues.
Now, the application was designed (not by me) with a single Map defined in the unique main activity and use through the different fragments (included in the fragments as a View).
I am reading about the new api and have doubts:
1) Is it good to have 2 fragments on the same screen, one just for the map and the other one for other UI? This way i can create the effect of expanding/hiding almost completely the map with is such in fashion right now?
2) Have you knowledge about some guidelines to upgrade the API? I run on content about how to create with Api 2.0 but not to upgrade: rules, errors, guidelines?
Thank you a lot.
Edit: As always, I am working on it right now and I will post my solution/choice when I am done.
Upvotes: 0
Views: 136
Reputation: 22232
1) Is it good to have 2 fragments on the same screen, one just for the map and the other one for other UI?
Depends on what data you want to put on one screen. It is often a good idea to have most of the UI-related logic inside Fragments
instead of Activities
, because they can be arranged differently on phones and tablets.
This way i can create the effect of expanding/hiding almost completely the map with is such in fashion right now?
Animating might be problematic. See Issue 4659 and Issue 4639.
2) Have you knowledge about some guidelines to upgrade the API? I run on content about how to create with Api 2.0 but not to upgrade: rules, errors, guidelines?
IMHO the best way is to forget (delete) all the code related to v1 and start from scratch, following official documentation.
Upvotes: 0
Reputation: 24713
1) Is it good to have 2 fragments on the same screen, one just for the map and the other one for other UI? This way i can create the effect of expanding/hiding almost completely the map with is such in fashion right now?
Yes it is expected within the framework to have multiple fragments on the screen and is a large part of the reason they exist.
2) Have you knowledge about some guidelines to upgrade the API? I run on content about how to create with Api 2.0 but not to upgrade: rules, errors, guidelines?
The Getting Started section should help you somewhat on this transition. If there is something specific you are looking for such as optimizing memory during the placement of markers on the map it would be best to search for that as needed.
Upvotes: 0