hakuya
hakuya

Reputation: 41

how to repeat activity in android?

I have more than one that's are splashActivity, mainActivity, etc. In beginning of installing application it start activity at splashActivity, but if web click application icon it didn't start at splashActivity anymore, it stared directly into mainActivity.

How to set every starting application it will start at splashActivity?

Upvotes: 0

Views: 932

Answers (2)

Marmoy
Marmoy

Reputation: 8079

You can set the activity attribute noHistory to true in your manifest, like so: android:noHistory="true" Read: http://developer.android.com/guide/topics/manifest/activity-element.html#nohist With noHistory set to true, your activity will not be stored on the application stack and by setting it to true for all your activities, the application is forced to start from the first activity. See also: Removing an activity from the history stack

Upvotes: 1

kgiannakakis
kgiannakakis

Reputation: 104188

What probably has happened is that your application hasn't closed, but sent to background. When you start it again, it actually doesn't start again, but it is brought into foreground. This is standard behaviour and you shouldn't try to change it.

Upvotes: 0

Related Questions