diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index bb22b22b..0ff83e28 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -20,8 +20,7 @@ android:supportsRtl="true" android:theme="@style/Theme.Phonograph.Light" tools:ignore="UnusedAttribute"> - + @@ -176,7 +175,8 @@ android:label="@string/report_an_issue" /> + android:theme="@android:style/Theme.Translucent.NoTitleBar" + android:launchMode="singleInstance"/> \ No newline at end of file diff --git a/app/src/main/java/com/kabouzeid/gramophone/appshortcuts/AppShortcutLauncherActivity.java b/app/src/main/java/com/kabouzeid/gramophone/appshortcuts/AppShortcutLauncherActivity.java index 3986c3ca..d976686d 100644 --- a/app/src/main/java/com/kabouzeid/gramophone/appshortcuts/AppShortcutLauncherActivity.java +++ b/app/src/main/java/com/kabouzeid/gramophone/appshortcuts/AppShortcutLauncherActivity.java @@ -84,6 +84,9 @@ public class AppShortcutLauncherActivity extends Activity { //Put the bundle in the intent intent.putExtras(bundle); + //If MainActivity's already running, don't launch another instance. Instead, bring it to the top and deliver the intent to onNewIntent() + intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_NEW_TASK); + //Finally, start MainActivity with those extras startActivity(intent); }