|
|
@ -20,13 +20,16 @@ import android.os.Bundle; |
|
|
|
import android.support.v7.app.ActionBar; |
|
|
|
import android.support.v7.app.ActionBar; |
|
|
|
import android.support.v7.widget.Toolbar; |
|
|
|
import android.support.v7.widget.Toolbar; |
|
|
|
import android.view.MenuItem; |
|
|
|
import android.view.MenuItem; |
|
|
|
|
|
|
|
import android.view.View; |
|
|
|
import android.widget.MediaController; |
|
|
|
import android.widget.MediaController; |
|
|
|
|
|
|
|
import android.widget.ProgressBar; |
|
|
|
import android.widget.VideoView; |
|
|
|
import android.widget.VideoView; |
|
|
|
|
|
|
|
|
|
|
|
import butterknife.BindView; |
|
|
|
import butterknife.BindView; |
|
|
|
import butterknife.ButterKnife; |
|
|
|
import butterknife.ButterKnife; |
|
|
|
|
|
|
|
|
|
|
|
public class ViewVideoActivity extends BaseActivity { |
|
|
|
public class ViewVideoActivity extends BaseActivity { |
|
|
|
|
|
|
|
@BindView(R.id.video_progress) ProgressBar progressBar; |
|
|
|
@BindView(R.id.video_player) VideoView videoView; |
|
|
|
@BindView(R.id.video_player) VideoView videoView; |
|
|
|
@BindView(R.id.toolbar) Toolbar toolbar; |
|
|
|
@BindView(R.id.toolbar) Toolbar toolbar; |
|
|
|
|
|
|
|
|
|
|
@ -56,6 +59,7 @@ public class ViewVideoActivity extends BaseActivity { |
|
|
|
videoView.setOnPreparedListener(new MediaPlayer.OnPreparedListener() { |
|
|
|
videoView.setOnPreparedListener(new MediaPlayer.OnPreparedListener() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void onPrepared(MediaPlayer mp) { |
|
|
|
public void onPrepared(MediaPlayer mp) { |
|
|
|
|
|
|
|
progressBar.setVisibility(View.GONE); |
|
|
|
mp.setLooping(true); |
|
|
|
mp.setLooping(true); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|