在 android-maps-utils 从 0.4.3 升级到 0.4.4 后,我无法在 IconGenerator 中为集群图标设置 TextView 样式。无论我使用什么样式(来自 lib 或来自我的 styles.xml),TextView 都保持透明。
public class MapRenderCustom extends DefaultClusterRenderer<T> {
public MapRenderCustom(Context context, GoogleMap map, ClusterManager<T> clusterManager) {
super(context, map, clusterManager);
new IconGenerator(contex).setTextAppearance(com.google.maps.android.R.style.ClusterIcon_TextAppearance);
}
}
以上适用于 0.4.3。但在 0.4.4 中它不起作用(即使更改为 amu_ClusterIcon_TextAppearance)。
可以归咎于此的代码:https ://github.com/googlemaps/android-maps-utils/commit/29490ad2cbc6bf2fb13fb7ac60eb8769c408bd51但我看不出它如何破坏 TextView 的可见性。