i want to use countdown timer inside infowindow ,the value of timer is changing in Background but the textview is not updating.the textview is setting only when i click the marker .plz tell a possible solution or someother idea
mMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() {
@Override
public View getInfoWindow(final Marker marker) {
myMarker = mMarkersHashMap.get(marker);
runOnUiThread(new Runnable() {
@Override
public void run() {
timer1 = new CountDownTimer(Long.parseLong(myMarker.getTime()), 1000) {
@Override
public void onTick(long millisUntilFinished) {
String hms = String.format("%02d:%02d",
TimeUnit.MILLISECONDS.toMinutes(millisUntilFinished),
TimeUnit.MILLISECONDS.toSeconds(millisUntilFinished) -
TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(millisUntilFinished)));
Log.d("fsdf", hms);
infoTitle.setText(hms);
String check=infoTitle.getText().toString();
if(!check.equals(null)) {
Log.d("check 1", hms);
if (!check.equals(hms)) {
Log.d("check 2", hms);
infoTitle.setText(hms);
marker.showInfoWindow();
}
}
}
@Override
public void onFinish() {
infoTitle.setText("00");
}
}.start();
}
});
infoButtonListener.setMarker(marker);
mapWrapperLayout.setMarkerWithInfoWindow(marker, infoWindow);
return infoWindow;
}
@Override
public View getInfoContents(Marker marker) {
return null;
}
});
`