使用AppBarLayout在Recycler视图中查看CoordinatorLayout

时间:2015-06-22 06:38:49

标签: android google-maps-api-3

我正在尝试在回收站视图中充气地图

我很成功,但当我尝试在latlng中设置onBindViewHolder界限时 使用

    LatLngBounds.Builder builder = new LatLngBounds.Builder();
    builder.include(latLng_source);
    builder.include(latLng_destination);
    LatLngBounds bounds = builder.build();
    int padding = 0;
    CameraUpdate cu = CameraUpdateFactory.newLatLngBounds(bounds, padding);

我收到以下错误

     Error using newLatLngBounds(LatLngBounds, int): Map size can't be 0. Most likely, layout has not yet occured for the map view.  Either wait until layout has occurred or use newLatLngBounds(LatLngBounds, int, int, int) which allows you to specify the map's dimensions.

0 个答案:

没有答案