fix blink

This commit is contained in:
sonora 2014-08-24 11:59:48 +02:00
parent 6d1bfde23b
commit a01483c612

View file

@ -198,7 +198,7 @@ public class OsmandMonitoringPlugin extends OsmandPlugin implements MonitoringIn
setText(txt, subtxt);
setImageDrawable(d);
if (last != lastUpdateTime && globalRecord) {
if (last != lastUpdateTime && (globalRecord || isRecording) {
lastUpdateTime = last;
blink();
}
@ -207,12 +207,16 @@ public class OsmandMonitoringPlugin extends OsmandPlugin implements MonitoringIn
}
private void blink() {
setImageDrawable(monitoringSmall);
setImageDrawable(monitoringInactive);
invalidate();
postDelayed(new Runnable() {
@Override
public void run() {
setImageDrawable(monitoringBig);
if (globalRecord) {
setImageDrawable(monitoringBig);
} else {
setImageDrawable(monitoringSmall);
}
invalidate();
}
}, 500);