android - Application with 2 Activities Running Parallel -


i have application uses 2 activities, when clicking item in listview inside activity 1 goes activity 2 , adds new fragment it, , pressing button goes activity 1, activity 2 , fragments/controls destroyed, , clicking item in activity 1, creates new activity 2 , adds fragment it.

is there anyway can run 2 activities in parallel? both running in parallel? use code start activity 2

intent intent = new intent(this, displaydataactivity.class); startactivity(intent); 

can keep reference in activity 1 clicking on listview items shows activity 2 if it's created?

thanks

i don't know why need that. check app architecture and/or ui - possibly wrong.

but possible - need maintain 2 activity tasks (google documentation)

  • use different taskaffinity activities create 2 tasks (separate activity stacks)
  • override onback button if need - replace appropriate second activity intent call

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -