This week's book giveaway is in the NodeJS forum.
We're giving away four copies of Serverless Applications with Node.js and have Slobodan Stojanovic & Aleksandar Simovic on-line!
See this thread for details.
Win a copy of Serverless Applications with Node.js this week in the NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Ron McLeod
  • Tim Moores
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Vijitha Kumara

How do I maintain the state of the media player in a fragment when changing the activities in Androi  RSS feed

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a Media Player UI in a Fragment in Main Activity which plays all songs from the emulator. Below this fragment I have List of Playlists. I can click on any of the playlists name and second activity opens with names of songs in that playlist. What I want is that after navigating to new Activity I should still be able to see the same fragment from Main Activity playing the song with Title and Artist name. Also I have to maintain the current state of player like seekbar progress irrespective doing back and forth between multiple activities. Can this be achieved without having to create a new Fragment (and thus have fragment to fragment data sharing) in second Activity and instead load the Fragment from Main Activity as it is? If new Fragment needs to be created in Second Activity how should I pass the song detail like Album art, Title, Artist etc. from first fragment to second fragment?
 
PI day is 3.14 (march 14th) and is also einstein's birthday. And this is merely a tiny ad:
global solutions you can do at home or in your backyard
https://www.kickstarter.com/projects/paulwheaton/better-world-boo
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!