2

I am trying to show a mediacontroller for a videoview which exist on a custom dialog. But somehow the mediacontroller does not appear. I have seen few questions related to this, but havent found any suitable answer for it yet.

Is it happening because I am trying to show the mediacontroller on the custom dialog?

If yes then is there any workaround for same?

rahul
  • 1,095
  • 8
  • 22

1 Answers1

0

Use Activity instead of DialogFragment and set the Activity theme in AndroidManifest.xml like this:

android:theme="@android:style/Theme.Dialog"
Faraz
  • 2,144
  • 1
  • 18
  • 28
  • 1
    Yes but I have already done a lot of coding using custom dialog, no way to do it with existing dialog? – rahul Dec 31 '15 at 05:38
  • 1
    I think there is no other way to do it with `DialogFragment`. And please do let me know if you find the solution. – Faraz Dec 31 '15 at 06:30
  • This was a good idea for me, I spent many hours trying to show the controls in the `DialogFragment` without success. But when I change to `Activity` this works right away. I use this theme for my dialog actyvity: `` – Geynen May 07 '17 at 00:04
  • This is not a real answer to the question. – OhhhThatVarun Mar 02 '23 at 09:46