简体   繁体   中英

Switching between activities in android design

I'd like to make an application using the DJI SDK. I'm very new to Android development, and I'd like the application to be able to do two things: show the plane's current gps on a map and also connect to the plane's camera.

So, is it better from a design standpoint to show the plane's current gps on a map, and then hide the plane's camera view until a button is clicked to toggle the view? Or is it better to make an entire new activity to show the camera view or map, and then toggle between activities but save the information on each activity so that when I switch back, I can still see the current state of the aircraft from the current viewpoint?

Which is better when considering design, memory/battery usage, and scalability?

What you can do is to have a activity with a google map as base layout (it's a fragment i know) and put an Frame Layout on top of it, and by clicking on the frame layout you can increase and decrease the size of the camera view. I did it like that way, and works great for me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM