我无法弄清楚如何在自定义视图集类中的mapview.onCreate()中传递Bundle

时间:2017-04-03 09:40:32

标签: java android google-maps android-recyclerview fragment-lifecycle

我有一个用于recyclerview的通用视图类,它在该行中使用MapView,而viewholder类正在扩展我的基本视图抽象类,它具有populateData(TO to),我在我的viewholder类的构造函数中初始化map并传递null to mapview.onCreate(null)。

我的课程看起来像这样

public class MyViewHolder extends BaseViewHolder implements OnReadyMapCallBack{

   private MapView mapView;
   public MyViewHolder(View view){

       mapView = view.findViewById(R.id.map);
       mapView.onCreate(null); //here i should pass Bundle instead


      }
// this method is declared in parent class abstract class

@override    
public void populateData(TO to){ 
     mapView.getAsync(this);
}
 public void onMapReady(GoogleMap googleMap) {
}
}

1 个答案:

答案 0 :(得分:0)

enter image description here你纠结了这个:

<Loggers>
    <Root level="INFO">
      <AppenderRef ref="Console"/>
      <AppenderRef ref="RollingFile" />
    </Root>
    <Logger name="corg.springframework.web" level="INFO">
      <AppenderRef ref="Console"/>
    </Logger>
</Loggers>