Reputation: 5121
The way I have my app set up now the initial activity that launches displays an options screen which has 4 buttons. Each button when clicked.launches its own activity and layout that goes with it. But when the user clicks a button it takes almost 3-5 seconds.for the activity to open the new screen. Is there a better way of doing this so that it loads faster? Is there a way to launch all of the activities in the background at the start of the app so they are already running? What woiluld be the best/recomended way of dealing with this.
Upvotes: 4
Views: 10992
Reputation: 15046
Upvotes: 1
Reputation: 11437
Also you can move a lot of initial setup to a class that extends the Application class. Moving setup from activities to Application will speed up your app as Application class runs only once when the app is first initiated. More info: http://developer.android.com/reference/android/app/Application.html
Upvotes: 2
Reputation: 9258
In addition to Laurence Dawson's answer, it could be a large amount of data passing through the intent that cause that lag. In this case I'd consider to change the code from using separate activities to one activity with ViewFlipper to avoid parceling/unparceling that data.
Upvotes: 2