Commit 292e7c74 authored by Sajal Narang's avatar Sajal Narang Committed by GitHub

Merge pull request #244 from wncc/issue240

Fade transition only on theme change (fix #240)
parents e9d8f14e d9ea6339
...@@ -133,6 +133,7 @@ public final class Utils { ...@@ -133,6 +133,7 @@ public final class Utils {
darkTheme = !darkTheme; darkTheme = !darkTheme;
Intent intent = new Intent(context, MainActivity.class); Intent intent = new Intent(context, MainActivity.class);
context.startActivity(intent); context.startActivity(intent);
context.overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
context.finish(); context.finish();
} }
} }
...@@ -165,7 +165,6 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On ...@@ -165,7 +165,6 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
private GestureDetector gestureDetector = new GestureDetector(MainActivity.this, new GestureDetector.SimpleOnGestureListener() { private GestureDetector gestureDetector = new GestureDetector(MainActivity.this, new GestureDetector.SimpleOnGestureListener() {
@Override @Override
public boolean onDoubleTap(MotionEvent e) { public boolean onDoubleTap(MotionEvent e) {
Toast.makeText(MainActivity.this, "You have unlocked super max pro mode", Toast.LENGTH_SHORT).show();
Utils.changeTheme(MainActivity.this); Utils.changeTheme(MainActivity.this);
return super.onDoubleTap(e); return super.onDoubleTap(e);
} }
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
<item name="themeColorInverse">#000000</item> <item name="themeColorInverse">#000000</item>
<item name="newsColor">#F2F2F2</item> <item name="newsColor">#F2F2F2</item>
<item name="urlColor">@color/colorPrimary</item> <item name="urlColor">@color/colorPrimary</item>
<item name="android:windowAnimationStyle">@style/WindowAnimationTransition</item>
</style> </style>
<style name="AppTheme.NoActionBar"> <style name="AppTheme.NoActionBar">
...@@ -26,7 +25,6 @@ ...@@ -26,7 +25,6 @@
<item name="themeColorInverse">#FFFFFF</item> <item name="themeColorInverse">#FFFFFF</item>
<item name="newsColor">#00000000</item> <item name="newsColor">#00000000</item>
<item name="urlColor">@color/colorAccent</item> <item name="urlColor">@color/colorAccent</item>
<item name="android:windowAnimationStyle">@style/WindowAnimationTransition</item>
</style> </style>
<style name="AppThemeDark.NoActionBar"> <style name="AppThemeDark.NoActionBar">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment