Android place activity on another activity -


i have 2 activities in app, firstactivity , secondactivity. firstactivity accesses information internet takes few seconds load initially. i'd able open secondactivity , go firstactivity without reloading it.

one of thoughts had on how best accomplish open secondactivity on top of firstactivity, , remove secondactivity, when user wishes go firstactivity. way firstactivity doesn't have reload because loaded whole time, merely hidden behind secondactivity.

however i'm not sure how best accomplish task. couldn't figure out how open activity on top of activity. on how best appreciated, thanks!

firstactivity accesses information internet takes few seconds load initially. i'd able open secondactivity , go firstactivity without reloading it.

i recommend start 2nd activity directly, , there begin async task download whatever need internet. when async task done, switch first activity, uses things downloaded. if have few things pass over, consider putting downloaded info activity switch intent.

alternatively, fragments:

http://developer.android.com/guide/components/fragments.html

have 2 current activities 2 fragments. main activity, set 2nd fragment active @ start of app. when download finished, switch 1st fragment.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -