gpt4 book ai didi

android - 在 ExpandableListview 的 Childview 中添加 map 时出现问题

转载 作者:行者123 更新时间:2023-11-30 01:57:27 25 4
gpt4 key购买 nike

我在 ExpandableListview 的 ChildView 中使用 Fragment 添加 Map

当我展开 ExpandableListView 的所有 subview 时, map 没有显示。我滚动到 ExpandableListView 的末尾,然后向上滚动,现在显示了 map 。

我该如何解决这个问题?

最佳答案

这样试试

getMapAsync(OnMapReadyCallback callback) 你可以在 GoogleMap 准备好时设置监听器

public class MainActivity extends FragmentActivity
implements OnMapReadyCallback {
...
}

@Override 
public void onMapReady(GoogleMap map) {
map.addMarker(new MarkerOptions()
.position(new LatLng(0, 0))
.title("Marker"));
}

关于android - 在 ExpandableListview 的 Childview 中添加 map 时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32002429/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com