Add a transition when entering and exiting the Reading mode
This commit is contained in:
parent
b0169e73d2
commit
3b75765d92
@ -51,6 +51,7 @@ public class ReadingActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
overridePendingTransition(R.anim.slide_in_from_right, R.anim.fade_out_scale);
|
||||||
mPreferences = PreferenceManager.getInstance();
|
mPreferences = PreferenceManager.getInstance();
|
||||||
mInvert = mPreferences.getInvertColors();
|
mInvert = mPreferences.getInvertColors();
|
||||||
final int color;
|
final int color;
|
||||||
@ -228,6 +229,14 @@ public class ReadingActivity extends AppCompatActivity {
|
|||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onPause() {
|
||||||
|
super.onPause();
|
||||||
|
if (isFinishing()) {
|
||||||
|
overridePendingTransition(R.anim.fade_in_scale, R.anim.slide_out_to_right);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
switch (item.getItemId()) {
|
switch (item.getItemId()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user