private class CustomInfoWindowAdapter implements InfoWindowAdapter{
enter code here
private View view;
public CustomInfoWindowAdapter() {
//view = getLayoutInflater().inflate(R.layout.custom_info_window, null);
}
@SuppressLint("InflateParams")
@Override
public View getInfoContents(Marker marker) {
view = getLayoutInflater().inflate(R.layout.custom_info_window, null);
Log.d("call", filteredDataList.toString());
try {
if(filteredDataList.size() != 0){
listitemview = (ListView) view.findViewById(R.id.ListItems);
InfoItemAdapter adp = new InfoItemAdapter(BuyScreenCustomListview.this,
position, filteredDataList);
listitemview.setAdapter(adp);
listitemview.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent,
View view, int position, long id) {
}
});
}
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
LatLng l = marker.getPosition();
Log.d("value","" + l.latitude);
return view;
}
@Override
public View getInfoWindow(Marker marker) {
return null;
}
}
答案 0 :(得分:0)
替换你的
listitemview.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent,
View view, int position, long id) {
}});
与
listitemview.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
// TODO Auto-generated method stub
}
});