diff --git a/app/src/main/assets/help.html b/app/src/main/assets/help.html index 4807d9ca1..f4050bb61 100644 --- a/app/src/main/assets/help.html +++ b/app/src/main/assets/help.html @@ -260,18 +260,26 @@

Quick Start - the Center button.

•The "Pan" (Pan/Draw) button allows you to jot quick - notes on charts. In the Maps screen, tap the Pan button at the lower-right. + notes on charts. In the Map or Plate screen, tap the Pan button at the lower-right. When the Pan button changes to the Draw button, the charts will - not pan, and the Map screen becomes a touch operated pen for writing or + not pan, and the screen becomes a touch operated pen for writing or drawing on charts. Draw or write notes on the screen with your finger. Notes length is limited due to memory size.

To erase all notes and drawings in Draw - mode, long press the screen and then press the Clear button - that appears.

- -

To temporarily hide your notes/drawings and return to - normal Map functioning (Pan mode), just tap the Draw (Pan) button again.

+ mode, press the Clear button.

+ +

To return to + normal Map/Plate functioning (Pan mode), just tap the Draw (Pan) button + again.

+ +

The color used for drawing can be set in + Preferences->Display->Drawing Color. The color may be one of + red, blue, green, black, white, gray, cyan, magenta, yellow, lightgray, + darkgray, grey, lightgrey, darkgrey, aqua, fuchsia, lime, maroon, navy, + olive, purple, silver, teal + or may be specified using #RRGGBB notation. If the color is not + specified or is illegal, blue with a black outline will be used.

Long-press any point on the chart (with GPS acquired) to display text at the top of the screen giving diff --git a/app/src/main/java/com/ds/avare/storage/Preferences.java b/app/src/main/java/com/ds/avare/storage/Preferences.java index c56b87183..7826850f8 100644 --- a/app/src/main/java/com/ds/avare/storage/Preferences.java +++ b/app/src/main/java/com/ds/avare/storage/Preferences.java @@ -1201,4 +1201,17 @@ public void setLastConnectedWifi(String val) { mPref.edit().putString("LastConnectedWifi", val).commit(); } + public int[] getDrawColor() { + int color, isDefaultColor = 0; + + try { + color = Color.parseColor(mPref.getString(mContext.getString(R.string.DrawColor), "")); + } + catch(IllegalArgumentException|StringIndexOutOfBoundsException e) { + color = Color.BLUE; + isDefaultColor = 1; + } + + return new int[] { color, isDefaultColor }; + } } diff --git a/app/src/main/java/com/ds/avare/views/LocationView.java b/app/src/main/java/com/ds/avare/views/LocationView.java index 109fe0e01..2784e519d 100644 --- a/app/src/main/java/com/ds/avare/views/LocationView.java +++ b/app/src/main/java/com/ds/avare/views/LocationView.java @@ -700,16 +700,20 @@ private void drawDrawing(Canvas canvas, DrawingContext ctx) { * Get draw points. */ - // Blue inside, black outside Paint.Cap oldCaps = mPaint.getStrokeCap(); mPaint.setStrokeCap(Paint.Cap.ROUND); // We use a wide line. Without ROUND the line looks broken. - mPaint.setColor(Color.BLACK); + int[] prefColor = mPref.getDrawColor(); + + mPaint.setColor(prefColor[1] == 1 ? Color.BLACK : prefColor[0]); mPaint.setStrokeWidth(6 * mDipToPix); mService.getDraw().drawShape(canvas, mPaint, mOrigin); - mPaint.setColor(Color.BLUE); - mPaint.setStrokeWidth(2 * mDipToPix); - mService.getDraw().drawShape(canvas, mPaint, mOrigin); + if (prefColor[1] == 1) + { + mPaint.setColor(prefColor[0]); + mPaint.setStrokeWidth(2 * mDipToPix); + mService.getDraw().drawShape(canvas, mPaint, mOrigin); + } mPaint.setStrokeCap(oldCaps); // Restore the Cap we had before drawing } diff --git a/app/src/main/java/com/ds/avare/views/PlatesView.java b/app/src/main/java/com/ds/avare/views/PlatesView.java index 9b5bc75fa..ce5e46731 100644 --- a/app/src/main/java/com/ds/avare/views/PlatesView.java +++ b/app/src/main/java/com/ds/avare/views/PlatesView.java @@ -195,13 +195,19 @@ public void setBitmap(BitmapHolder holder) { private void drawDrawing(Canvas canvas) { Paint.Cap oldCaps = mPaint.getStrokeCap(); mPaint.setStrokeCap(Paint.Cap.ROUND); // We use a wide line. Without ROUND the line looks broken. - mPaint.setColor(Color.BLACK); + int[] prefColor = mPref.getDrawColor(); + + mPaint.setColor(prefColor[1] == 1 ? Color.BLACK : prefColor[0]); mPaint.setStrokeWidth(6 * mDipToPix); mService.getPixelDraw().drawShape(canvas, mPaint); - mPaint.setColor(Color.BLUE); - mPaint.setStrokeWidth(2 * mDipToPix); - mService.getPixelDraw().drawShape(canvas, mPaint); + if (prefColor[1] == 1) + { + mPaint.setColor(prefColor[0]); + mPaint.setStrokeWidth(2 * mDipToPix); + mService.getPixelDraw().drawShape(canvas, mPaint); + } + mPaint.setStrokeCap(oldCaps); // Restore the Cap we had before drawing } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index ea0345712..2da219d08 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -642,4 +642,7 @@ Redistribution and use in source and binary forms, with or without modification, Notes Wx Weather not available + DrawColor + Drawing Color + Color for draw mode on maps and plates diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml index 89ff138a1..6b5667b4b 100644 --- a/app/src/main/res/xml/preferences.xml +++ b/app/src/main/res/xml/preferences.xml @@ -318,6 +318,11 @@ authors: zkhan, jlmcgraw android:key="@string/DefaultAFD" android:summary="@string/DefaultAFDSummary" android:title="@string/DefaultAFDLabel" /> + - \ No newline at end of file +