You can show the controller with reflection. However it will still hide when the user will click on the VideoView. If you want I can help you with the reflection code.
MediaControllerVisible(VV, True)
...
Sub MediaControllerVisible(VidV As VideoView, visible As Boolean)
Dim r As Reflector
r.Target = VidV
r.Target = r.GetField("mMediaController")
If visible Then r.RunMethod("show") Else r.RunMethod("hide")
End Sub
Hi Erel,
I have used the reflection to show the mediacontroller, but would like to move the controller to below wherever the videoview is located.
Right now it displays in the middle of the screen even though the panel containing the videoview is located somewhere else (upper right for example)
Is there a way to locate the mediacontroller with the videoview?
Thanks,
Rusty
I have tried putting it in a panel and putting it on the activity.
When it is on the activity, the mediacontroller is the width of the activity toward the bottom of the screen.
When it is in a panel, it is positioned at the bottom of the panel; the exact width of the panel, but centered in the screen.
So if the panel is 200dip wide and all the way to the right of the activity, the mediacontroller is in middle of the activity/screen and is 200dip wide.
I would very much like to have the mediacontroller appear to be part of the the videoview or the panel so that they stay together.
Is there any way to do this? Is there another lib that might allow this?
Thanks,
Rusty
Sub MediaControllerVisible(VidV As VideoView, visible As Boolean)
Dim r As Reflector
r.Target = VidV
r.Target = r.GetField("mMediaController")
If visible Then
r.RunMethod2("setLeft", 100dip, "java.lang.int")
r.RunMethod2("setTop", 100dip, "java.lang.int")
r.RunMethod2("show", 0, "java.lang.int")
Else
r.RunMethod2("hide", 0, "java.lang.int")
End If
End Sub
This doesn't seem to work. Have I done something incorrectly?
Thanks,
Rusty