How to improve fragment loading speed?

后端 未结 5 764
清歌不尽
清歌不尽 2020-12-04 14:38

Performance Enhancement:

Previously I saved ALL images in drawable folder, this might be the reason why the map first l

5条回答
  •  [愿得一人]
    2020-12-04 15:30

    You could try this

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.mapActivity);
        getSreenDimanstions();
        fragment = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map));
        
        map = fragment.getMap();    
    }
    

    This class is extended from Activity

提交回复
热议问题