From baecc20742e207b9f377f457da567a1fcca15652 Mon Sep 17 00:00:00 2001 From: Andreas Shimokawa Date: Fri, 5 Jun 2015 19:59:58 +0200 Subject: [PATCH] SleepMonitorActivity: Rotate annotation text for better readability --- .../freeyourgadget/gadgetbridge/SleepMonitorActivity.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/SleepMonitorActivity.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/SleepMonitorActivity.java index c08b0c01..dbc70bc1 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/SleepMonitorActivity.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/SleepMonitorActivity.java @@ -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; }