Audio player controls disappears

2019-08-12 17:20发布

I'm playing audio file using the mediaController. Everything is working fine, just the media controller hides after few second, but I want to show it then what should I do?

setContentView(R.layout.playingactivity);
mPath = (EditText) findViewById(R.id.path);
mPath.setText(GlobalVariable.getstrEmail());
mVideoView = (VideoView) findViewById(R.id.surface_view);
Uri uri = Uri.parse("/sdcard/download/test.mp3");

mediaController = new MediaController(this);
mediaController.setAnchorView(mVideoView);
mVideoView.setMediaController(mediaController);
mVideoView.setVideoURI(uri);
mVideoView.start();

0条回答
登录 后发表回答