Add this to your Activity
definition in AndroidManifest.xml
…
android:launchMode = "singleTop"
For example:
<activity
android:name=".MainActivity"
android:theme="@style/AppTheme.NoActionBar"
android:launchMode = "singleTop"/>
More Related Contents:
- Button a button unclickabale in Android
- Add button to a layout programmatically
- Event OnClick for a button in a custom notification
- How to open the options menu programmatically?
- How do I kill an Activity when the Back button is pressed?
- How exactly does the android:onClick XML attribute differ from setOnClickListener?
- handle textview link click in my android app
- How to restart Activity in Android
- Dilemma: when to use Fragments vs Activities:
- How to return a result (startActivityForResult) from a TabHost Activity?
- Change application’s starting activity
- Calling startActivity() from outside of an Activity context
- How to show a dialog to confirm that the user wishes to exit an Android Activity?
- Best way to add Activity to an Android project in Eclipse?
- Help with passing ArrayList and parcelable Activity
- Call method when home button pressed
- How to prevent an application from being uninstalled?
- Why this line xmlns:android=”http://schemas.android.com/apk/res/android” must be the first in the layout xml file?
- Further understanding setRetainInstance(true)
- How to wrap the height of a ViewPager to the height of its current Fragment?
- Android: how to make an activity return results to the activity which calls it?
- How To Show and hide ActionBar with AppCompat v.7
- Android – detecting application launch from home or history
- Display Activity From Bottom to Top
- Single click and double click of a button in android
- Coordinator Layout with Toolbar in Fragments or Activity
- OnItemClickListener doesn’t work with ListView item containing button
- How to avoid multiple button click at same time in android?
- Multi-State Toggle Button
- Android: Creating shaped button