Playing video in Android in overlapped view -
Playing video in Android in overlapped view -
i wish play video file in application when user performs action. googled code samples it, samples found play video within pre-defined view in application. need different: launch video player on top of application, in overlapped full-screen window/view.
i tried next code, video window not come up:
videoview videoview = new videoview(this /* activity */); videoview.setlayoutparams(new layoutparams(layoutparams.wrap_content, layoutparams.wrap_content)); videoview.setmediacontroller(new mediacontroller(videoview.getcontext())); videoview.setvideopath(videofile.getabsolutepath()); videoview.setvisibility(view.visible); videoview.requestfocus(); videoview.start(); videoview.bringtofront();
what should create player show up?
try create activity shows videoview , works dialog. activity dialog simple code , can samples easily. set theme dialog.
android android-mediaplayer
Comments
Post a Comment