Questions tagged [android-rect]
6 questions
1
vote
2 answers
How to draw four boundary corner in canvas for qr code scanner
I need to draw in canvas four boundary corner for qr code scanner. Here is example (I need to draw this four blue boundary corner).
I know how to draw rectangle:
val rectF = RectF(left, top, right, bottom)
canvas.drawRoundRect(rectF,…

testivanivan
- 967
- 13
- 36
0
votes
1 answer
How can detect barcode cornerPoints inside a View?
My barcode reader runs well but I want user can only scan barcode what is inside in view area to detect. I wrote a code for it. I can get cornerPoints of barcode that scanned but I can't realize if it's inside my detection view. I can't see rect…

Ahmet Yılmaz
- 425
- 5
- 16
0
votes
1 answer
Android. How to paint all area around of rectangle?
I have custom view and inside onDraw I need to draw in canvas rectangle. I have RectF with all coordinates. And now I need to paint the entire area around the rectangle in a different color. Is it possible to do this using RectF ?
Please help me.

testivanivan
- 967
- 13
- 36
0
votes
0 answers
Android. How to get the bounds of the area associated with this window?
I have code to get the bounds of the area associated with this window:
context.getSystemService(WindowManager::class.java).currentWindowMetrics.bounds
But this code requires API level 30, my min is 21.
Is it possible to do the same but for api 21…

testivanivan
- 967
- 13
- 36
0
votes
2 answers
How to change color of Rects instantly when touched?
I'm working in an app that uses the ml kit text recognition library; The app reads text from images and puts a Rect around every word.
Now I want these Rects to change color when the user tap on one of them or swipe above some words.
So, I was able…

Ziad H.
- 528
- 1
- 5
- 20
0
votes
2 answers
Draw RectF on canvas
I have a view(Calendar) that contains multiple Rects(Events) drawn on it, now I am trying to implement drag/drop as another layer on top of that view. Example- I long-press on an event, it passes me the exact coordinates of the Rect(Event), no I…

Lakhwinder Singh
- 6,799
- 4
- 25
- 42