我有几个问题。
1.如何启用VideoView
滚动条?我这样做了
vv.isHorizontalScrollBarEnabled();
vv.canSeekForward();
vv.canSeekBackward();
但没有任何帮助。我需要一个可以回放视频的条纹
这是我的代码
import android.app.Activity;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.VideoView;
public class MyActivity extends Activity implements View.OnClickListener {
/**
* Called when the activity is first created.
*/
private Button btn;
private VideoView vv;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
btn = (Button) findViewById(R.id.button);
btn.setOnClickListener(this);
vv = (VideoView) findViewById(R.id.videoView);
}
@Override
public void onClick(View view) {
switch (view.getId()){
case R.id.button:
vv.setVideoURI(Uri.parse(myLink));
vv.canSeekForward();
vv.canSeekBackward();
vv.isHorizontalScrollBarEnabled();
vv.isScrollbarFadingEnabled();
vv.start();
break;
}
}
}