When i open one of my screens for the fist time, there is lag, but afte开发者_如何学编程r it has been opened and i switch it runs smoothly. Is there a way to load the all the images before the app starts so that it doesn't lag the first time i switch to those screens?
You should load them asynchronously in a background thread and then update the display. You can upadte UI separately for each picture downloaded. Take a look at AsyncTask
.
Consider using a splash screen. So when the user first start the app something will be on the screen and use the AsncTask if you need to fetch any resources or do any background process.
精彩评论