开发者

setContentView with layout containing a MapView very slow the first time

开发者 https://www.devze.com 2023-03-11 06:25 出处:网络
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 faste

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消