I want to have SupportMapFragment in one of my Activity. I add this fragment directly to layout xml and this layout set as content view. But when Activity is launched for the first time, it takes too long (over 1 second). Next launches are ok and take few milliseconds.
I tried:
- remove any initialization
- use MapFragment instead of SupportMapFragment
- add MapFragment programatically
but nothing helped. Map is shown without any problem or suspicious log.
Do you have any suggestion, what it causes and how to improve it?
edit: I have a ListView and when user clicks on Item, it launches DetailActivity with MapFragment. After click on item there is a noticeable delay before DetailActivity shows up. Only method onCreate, where I call setContentView, runs over 1 second. And while activity is in onCreate method, there is no visible content from this activity. This delay between click and showing content is not very user friendly.
Thank you