restore the video progress at rotate
This commit is contained in:
parent
e4bbe31276
commit
9fdf5bcd44
|
@ -40,10 +40,13 @@ public class PhotoVideoActivity extends AppCompatActivity implements ViewPagerFr
|
||||||
final Bundle bundle = new Bundle();
|
final Bundle bundle = new Bundle();
|
||||||
final Medium medium = new Medium(mUri.toString(), mIsVideo, 0);
|
final Medium medium = new Medium(mUri.toString(), mIsVideo, 0);
|
||||||
bundle.putSerializable(Constants.MEDIUM, medium);
|
bundle.putSerializable(Constants.MEDIUM, medium);
|
||||||
final ViewPagerFragment fragment = (mIsVideo ? new VideoFragment() : new PhotoFragment());
|
|
||||||
fragment.setListener(this);
|
if (savedInstanceState == null) {
|
||||||
fragment.setArguments(bundle);
|
final ViewPagerFragment fragment = (mIsVideo ? new VideoFragment() : new PhotoFragment());
|
||||||
getSupportFragmentManager().beginTransaction().replace(R.id.fragment_holder, fragment).commit();
|
fragment.setListener(this);
|
||||||
|
fragment.setArguments(bundle);
|
||||||
|
getSupportFragmentManager().beginTransaction().replace(R.id.fragment_holder, fragment).commit();
|
||||||
|
}
|
||||||
hideSystemUI();
|
hideSystemUI();
|
||||||
setTitle(Utils.getFilename(mUri.toString()));
|
setTitle(Utils.getFilename(mUri.toString()));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue