calling setContentView
with layout containing a M开发者_JAVA百科apView is very slow the first time, and quite fast afterwards. Why? Does it already load some map images called? How can I make it faster (I'm in debug mode, just in case...)?
Thanks
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.mylayoutwithmapview); //very slow the first time
//...
}
To solve that I added a MapView (not used) in a layout shown after my splash screen, so that the first long call of setContentView is not noticed.
精彩评论