Boa Tarde.
Estou tentando colocar um checkbox no InfoAdapter, mas não consigo checá-lo. Segue código:
mapa.setInfoWindowAdapter(new InfoWindowAdapter() {
@Override
public View getInfoWindow(final Marker marker) {
LinearLayout ll = new LinearLayout(Mapa_Quadras.this);
ll.setOrientation(LinearLayout.VERTICAL);
ll.setBackgroundResource(R.drawable.shape_layout);
ll.setPadding(20,20,20,20);
ll.setGravity(Gravity.CENTER_HORIZONTAL);
ImageView img_foto = new ImageView(Mapa_Quadras.this);
final TextView tv = new TextView(Mapa_Quadras.this);
TextView tv_snippet = new TextView(Mapa_Quadras.this);
CheckBox chk_inscricao = new CheckBox(Mapa_Quadras.this);
img_foto.setId(R.drawable.camera_b);
tv.setText(Html.fromHtml("<b><big><font color=\"#27408B\">" + marker.getTitle() + "</big>"));
tv_snippet.setText(Html.fromHtml("<b><small><font color=\"#FFFFFF\">" + marker.getSnippet() + "</font></small></b>"));
polygono_options.strokeColor(Color.parseColor("#FF0000")).strokeWidth(2).fillColor(Color.argb(90, 255, 180, 90)).describeContents();
chk_inscricao.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
Log.i("MAPA", "TEste Clique Check");
}
});
ll.addView(chk_inscricao);
ll.addView(tv);
ll.addView(tv_snippet);
return ll;
}
@Override
public View getInfoContents(Marker arg0) {
return null;
}
});
Quem puder ajudar, fico muito Grata