android:layout_centerHorizontal=“true”
android:layout_marginBottom=“@dimen/y100”
android:background=“@drawable/video_progress_shape”
android:visibility=“gone”>
<ImageView
android:id=“@+id/play”
android:layout_width=“@dimen/x90”
android:layout_height=“@dimen/y90”
android:layout_gravity=“center_vertical”
android:src=“@mipmap/stop”/>
<SeekBar
android:id=“@+id/video_progress”
style=“@style/Widget.AppCompat.ProgressBar.Horizontal”
android:layout_width=“@dimen/x600”
android:layout_height=“@dimen/y100”
android:layout_marginLeft=“@dimen/x_20”/>
<TextView
android:id=“@+id/video_duration”
android:layout_width=“@dimen/x240”
android:layout_height=“wrap_content”
android:layout_gravity=“center_vertical”
android:textColor=“@color/colorFFFFFF”/>
<ImageView
android:id=“@+id/video_vr”
android:layout_width=“@dimen/x90”
android:layout_height=“@dimen/x90”
android:layout_gravity=“center_vertical”
android:src=“@mipmap/icon_vr”/>
PlayerActivity
public class PlayerActivity extends Activity implements View.OnClickListener {
private VrVideoView mVideoView;
private String mUrl;
private TextView mVideoDuration;
private SeekBar mSeekBar;
private View mVideoPorgressContainer;
private String mTotalDuration;//视频总时长, 00:08格式
private ImageView mPlayView;
private boolean isPlaying;
private View mVideoVr;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_player);
Intent intent = getIntent();
mUrl = intent.getStringExtra(“url”);//上一个Activity传递过来的url播放地址
initView();
initData();
initListener();
}
@Override
protected void onNewIntent(Intent intent) {
setIntent(intent);
//TODO handleIntent
}
private void initVie