0

I am working on a project where i want to implement mediaplayer as docked/Floating type similar to Gallary mediaPlayer of Samsung.

i was thinking of the following views/widgets but could not decide which would be helpful:

  1. popupwindow
  2. Android widget.
  3. viewDragghelper.

Please suggest what to be used so that player continues to play even when we exits the application.

Here i attach a snapshot for reference.

enter image description here

Amritpal Singh
  • 984
  • 2
  • 14
  • 33
  • You can use [TextureView](http://developer.android.com/reference/android/view/TextureView.html). TextureView can be moved, transformed, animated, etc. For instance, you can make a TextureView semi-translucent by calling myView.setAlpha(0.5f). Its for api level 14 and above. Not sure how you can make it work outside the app. – Hemanth Jan 09 '15 at 08:10

1 Answers1

0

If you need something that can persists playing after you leave your main activity, than you need to create your View hierarchy and attach it to a Window (like chat-heads does), using a Service as context.

You can find a working example here.

Community
  • 1
  • 1
bonnyz
  • 13,458
  • 5
  • 46
  • 70