【问题标题】:BUG the marker change the color when touch itBUG 标记触摸时会改变颜色
【发布时间】:2020-02-20 00:07:29
【问题描述】:

从片段加载时的标记,加载一种颜色,但是单击时它会改变颜色,而我单击标记时没有颜色变化。有什么建议可以解决吗?因为只有在状态逻辑正常的情况下,视图才会在内部发生变化;标记实际上应该是绿色的,但它变成了橙色。

bug in marker, must be green

change color when touch it

【问题讨论】:

    标签: android google-maps android-studio android-activity location


    【解决方案1】:

    以这种方式设置标记希望对您有所帮助

          //place marker where user just clicked
            marker = googleMap.addMarker(new MarkerOptions()
                    .position(latLng)
                    .title("You are here!!!")
                    .draggable(true)
                    .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN)));                 
            googleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng, 15));
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-04-21
      • 2013-02-17
      • 1970-01-01
      • 2020-03-23
      • 2021-04-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多