4
如何避免重新加載視頻方向變化,即迫使視頻從其中恢復。安卓視頻重新定向
下面我嘗試,但它無法
vd = (VideoView) findViewById(R.id.vplayer);
.......
public void onSaveInstanceState(Bundle savedInstanceState) {
super.onSaveInstanceState(savedInstanceState);
savedInstanceState.putInt("Position",vd.getCurrentPosition());
}
public void onRestoreInstanceState(Bundle savedInstanceState) {
super.onRestoreInstanceState(savedInstanceState);
int position= savedInstanceState.getInt("Position");
vd.seekTo(position);
}