1

I'm trying to make a blinker for my calculator app. I have created the blinker using a view that fades in and out. I can position the blinker where it needs to be in some device densities but not in others.

I create a drawable to draw the math expressions. I need the blinker to be at the last character drawn in the drawable.

I need to store the position of the last character drawn inside the canvas of drawable. Then, I need to transform that position to Window coordinates. So, I can position the blinker view in the same spot of the last drawn character.

I am trying to get the Matrix of the WindowManager but I cant find it. I read using WindowMetrics.getBound() gives a Rect that has the window size. But, WindowMetrics was added in API 30.

I need to use another alternative cause the app runs on API ≤ 30. How can I get the Matrix of the WindowManager so I can convert the position of the last drawn character inside the canvas to Window coordinates?

i_o
  • 777
  • 9
  • 25

0 Answers0