Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f1d44e88 authored by “Longbo's avatar “Longbo Committed by Longbo Wei
Browse files

autoclick: Use default color for scroll dot

new spec design: http://screen/3nceC5Ay6dtoxrt

screenshot:
http://screen/5PhgJu7DnnRfkaR

Bug: b/421409232
Test: atest
Flag: com.android.server.accessibility.enable_autoclick_indicator
Change-Id: I2e33f3d9e672fec799ffe1eae26308e5e606c492
parent 93fd7e40
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_M

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.PixelFormat;
import android.util.DisplayMetrics;
@@ -75,9 +76,14 @@ public class AutoclickScrollPointIndicator extends View {
    protected void onDraw(Canvas canvas) {
        super.onDraw(canvas);

        // Draw a solid circle with materialColorPrimary.
        // Draw a circle at (mX, mY) with default black fill and white border.
        mPaint.setStyle(Paint.Style.FILL);
        mPaint.setColor(getContext().getColor(R.color.materialColorPrimary));
        mPaint.setColor(Color.BLACK);
        canvas.drawCircle(mX, mY, mPointSizePx, mPaint);

        mPaint.setStyle(Paint.Style.STROKE);
        mPaint.setStrokeWidth(1f);
        mPaint.setColor(Color.WHITE);
        canvas.drawCircle(mX, mY, mPointSizePx, mPaint);
    }