how to clear surface holder when media player is finished?
问题 I made a video player with surfaceview and mediaplayer. i have 10 videos and 10 buttons. if click on each buttons, each videos are playing. here is my code.. //onCreate holder = surfaceview.getHolder(); holder.addCallback(this); holder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); //Button1 if(mp == null)mp = new MediaPlayer(); mp.setDataSource(mediaplay_path); mp.setDisplay(holder); mp.setScreenOnWhilePlaying(true); mp.setAudioStreamType(AudioManager.STREAM_MUSIC); mp.prepare(); mp.start