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

标签 android expandablelistview supportmapfragment

我在 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/

相关文章:

android - MapFragment 在 getMapAsync(this) 方法中导致 NullPointerException

android - Retrofit 图片上传返回 415 Unsupported Media Type

java - XML Pull 解析器异常 - kSOAP2

android - 标题栏下方的黑色空间使用 ListView 的自定义背景

ios - iOS 中的多级树 UITableView

android - 如何使用两个 fragment 实现视频和视频列表

java - ExpandableListView 对于列表中的最后一项表现异常

android - 如何从 Google map V2 获取快照

android - Nexus One 中的 SupportMapFragment

java - ListView 更新单行