- if (saved_state != null)
- mAgeView.setText(String.format("%d", (System.currentTimeMillis() - saved_state.received_time + 500) / 1000));
+ if (saved_state != null) {
+ int age = (int) ((System.currentTimeMillis() - saved_state.received_time + 500) / 1000);
+ boolean old = age >= 10;
+ if (old != mAgeViewOld) {
+ if (old)
+ mAgeView.setTextColor(mAgeOldColor);
+ else
+ mAgeView.setTextColor(mAgeNewColor);
+ mAgeViewOld = old;
+ }
+ mAgeView.setText(String.format("%d", age));
+ }