Skip to content

Commit

Permalink
Merge pull request #419 from s-cortes/patch-6
Browse files Browse the repository at this point in the history
reload songs on screen rotation in playlist detail
  • Loading branch information
naman14 authored Oct 5, 2020
2 parents 2f58c82 + cff430d commit 1272a34
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Handler;
import android.os.PersistableBundle;
import android.preference.PreferenceManager;
import android.provider.MediaStore;
import android.support.annotation.NonNull;
Expand Down Expand Up @@ -133,11 +134,21 @@ public void onCreate(Bundle savedInstanceState) {

animate = getIntent().getBooleanExtra(Constants.ACTIVITY_TRANSITION, false);
if (animate && TimberUtils.isLollipop()) {
getWindow().getEnterTransition().addListener(new EnterTransitionListener());
if(savedInstanceState != null && savedInstanceState.containsKey("ROTATION_RECREATION")){
setUpSongs();
}
else{
getWindow().getEnterTransition().addListener(new EnterTransitionListener());
}
} else {
setUpSongs();
}
}

@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putString("ROTATION_RECREATION", "Rotacion");
}

private void setAlbumart() {
Expand Down

0 comments on commit 1272a34

Please sign in to comment.