My app consists of 7 activities. For the first time when it has 开发者_如何转开发been installed in a device, I want to show all the activities. When the app has been closed and used later, I want a particular activity to be hidden. How to work out this? Please help me. If I have to use onResume
or onStart
, how to implement it?
The first time your application is launched set a boolean values such as isLaunched
to true
using
putBoolean(), and then subsequently, when you launch the app, if getBoolean of isLaunched
is true
, don't show that particular Activity.
You can only show one activity at a time in Android. What were you trying to accomplish by showing seven activities at once? Look into using Views instead of activities. For more information on activities, take a look at the Android Activity Lifecycle (you'll have to scroll to get there).
精彩评论