diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/canvas/GraphicSelection.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/canvas/GraphicSelection.java index 49bec5603cc9..3fa46192846e 100644 --- a/android/experimental/LOAndroid3/src/java/org/libreoffice/canvas/GraphicSelection.java +++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/canvas/GraphicSelection.java @@ -24,7 +24,8 @@ import static org.libreoffice.canvas.GraphicSelectionHandle.HandlePosition; * rectangle. */ public class GraphicSelection implements CanvasElement { - private final Paint mPaint; + private final Paint mPaintStroke; + private final Paint mPaintFill; public RectF mRectangle = new RectF(); public RectF mScaledRectangle = new RectF(); private RectF mDrawRectangle = new RectF(); @@ -39,10 +40,17 @@ public class GraphicSelection implements CanvasElement { */ public GraphicSelection() { // Create the paint, which is needed at drawing - mPaint = new Paint(); - mPaint.setStyle(Paint.Style.STROKE); - mPaint.setColor(Color.BLACK); - mPaint.setStrokeWidth(2); + mPaintStroke = new Paint(); + mPaintStroke.setStyle(Paint.Style.STROKE); + mPaintStroke.setColor(Color.GRAY); + mPaintStroke.setStrokeWidth(2); + mPaintStroke.setAntiAlias(true); + + mPaintFill = new Paint(); + mPaintFill.setStyle(Paint.Style.FILL); + mPaintFill.setColor(Color.WHITE); + mPaintFill.setAlpha(200); + mPaintFill.setAntiAlias(true); // Create the handles of the selection mHandles[0] = new GraphicSelectionHandle(HandlePosition.TOP_LEFT); @@ -95,7 +103,10 @@ public class GraphicSelection implements CanvasElement { */ @Override public void draw(Canvas canvas) { - canvas.drawRect(mDrawRectangle, mPaint); + canvas.drawRect(mDrawRectangle, mPaintStroke); + if (mType != DragType.NONE) { + canvas.drawRect(mDrawRectangle, mPaintFill); + } for (GraphicSelectionHandle handle : mHandles) { handle.draw(canvas); } diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/canvas/GraphicSelectionHandle.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/canvas/GraphicSelectionHandle.java index 52b662e4b80d..13487f65de87 100644 --- a/android/experimental/LOAndroid3/src/java/org/libreoffice/canvas/GraphicSelectionHandle.java +++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/canvas/GraphicSelectionHandle.java @@ -42,14 +42,19 @@ public class GraphicSelectionHandle implements CanvasElement { mHandlePosition = position; mStrokePaint.setStyle(Paint.Style.STROKE); - mStrokePaint.setColor(Color.BLACK); + mStrokePaint.setColor(Color.GRAY); mStrokePaint.setStrokeWidth(3); + mStrokePaint.setAntiAlias(true); mFillPaint.setStyle(Paint.Style.FILL); mFillPaint.setColor(Color.WHITE); + mFillPaint.setAlpha(200); + mFillPaint.setAntiAlias(true); mSelectedFillPaint.setStyle(Paint.Style.FILL); - mSelectedFillPaint.setColor(Color.BLUE); + mSelectedFillPaint.setColor(Color.GRAY); + mSelectedFillPaint.setAlpha(200); + mSelectedFillPaint.setAntiAlias(true); } /**