How to add custom controls to MapFragment in Google Maps Android API v2?

后端 未结 5 1326
故里飘歌
故里飘歌 2021-02-01 08:38

I have SupportMapFragment and I need to add custom controls into it for changing a map type. Calling getView(), I get NoSaveStateFramelayout and I don\'t think it is a good idea

5条回答
  •  逝去的感伤
    2021-02-01 09:18

    Try to put your map inside of a Frame Layout with Relative layout together when the map and the relative layout match_parent for the width and the height. In the relative layout place all your desired extended controls. That way the will sit on top on the map.

    some thing like that:

    
    
        
    
            
    
            

提交回复
热议问题