SleepMonitorActivity: Rotate annotation text for better readability

This commit is contained in:
Andreas Shimokawa 2015-06-05 19:59:58 +02:00
parent 813a02d5c7
commit baecc20742
1 changed files with 4 additions and 1 deletions

View File

@ -159,7 +159,10 @@ public class SleepMonitorActivity extends Activity implements SurfaceHolder.Call
date = cal.getTime();
String dateString = new SimpleDateFormat("HH:mm").format(date);
paint.setColor(Color.WHITE);
canvas.drawText(dateString, r.left - 20, r.top - 20, paint);
canvas.save();
canvas.rotate(-90.0f, r.left, r.top);
canvas.drawText(dateString, r.left + 10, r.top + 10, paint);
canvas.restore();
}
last_type = type;
}