This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final Activity activity = this.getActivity(); | |
if (activity != null) { | |
activity.runOnUiThread(new Runnable() { | |
@Override | |
public void run() { | |
activity.finish(); | |
activity.overridePendingTransition(R.anim.fade_in, R.anim.fade_out); | |
} | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private Action1<Boolean> rxRecycleSync = new Action1<Boolean>() { | |
Parcelable parcelable = null; | |
@Override | |
public void call(Boolean saveState) { | |
if (saveState) | |
parcelable = recyclerView.getLayoutManager().onSaveInstanceState(); | |
else | |
recyclerView.getLayoutManager().onRestoreInstanceState(parcelable); | |
} | |
}; |