android音频播放器

时间:2011-05-31 09:43:20

标签: android seek audio-player

我想开发具有搜索功能的音频播放器。 现在我只做播放和停止功能。我怎么能够 添加寻求功能吗?

提前致谢

3 个答案:

答案 0 :(得分:1)

使用:mediaPlayer.seekTo(int msec)

答案 1 :(得分:0)

    setContentView(R.layout.playingactivity);
    Toast.LENGTH_LONG).show();
    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.show(0);    
    mediaController.setAnchorView(mVideoView);
    mVideoView.setMediaController(mediaController);
    mVideoView.setVideoURI(uri);
    mVideoView.start();

答案 2 :(得分:0)

<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
          android:orientation="vertical"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"   >
<VideoView android:id="@+id/surface_view"
             android:layout_width="fill_parent"
             android:layout_height="fill_parent">
</VideoView></LinearLayout
相关问题