How do you programmatically change the width & height of Google Maps v2 (support Fragment)?

前端 未结 4 1398
清歌不尽
清歌不尽 2020-12-17 09:43

How do you programatically change the width and height of a com.google.android.gms.maps.SupportMapFragment? I\'d imagine you might be able to wrap it in a viewgroup with mat

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-17 10:06

    Fastest (with less code lines) way i found:

    ViewGroup.MarginLayoutParams parms = (ViewGroup.MarginLayoutParams) rlLocation.getLayoutParams();
        parms.bottomMargin = 100;
        parms.topMargin = 100;
    

提交回复
热议问题