I am trying to create a sudoku game. All the cells...
# compose
n
I am trying to create a sudoku game. All the cells of the sudoku board are
boxes
- nested in
rows
and
columns
- with some border around them. However, in some of the
boxes
the border appears to be thicker than others. Anybody knows why this is happening? In the code, the thickness of the border of all the
boxes
are same.
t
Is this a preview, an emulator, or a real device?
n
@tad It's an emulator.
t
Okay. Did you try zooming to 1:1?
n
I don't know how to do that. Is it something to be done in the emulator?
t
Nevermind. Just press the screenshot button in the emulator window and zoom in on the screenshot. I have a feeling this is just a result of scaling the emulator display.
If not, and if you require pixel-perfect accuracy with no aliasing, you'll have to do some Canvas work.
This is because a 1.dp line will not always align to the display's pixel grid. You can use Dp.Hairline to get a true single-pixel line, but that can be almost invisible on a high-density display. But in most real-world scenarios, including 1080p phone displays, you'll be hard-pressed to notice aliasing artifacts.
n
Yep. You were right. I couldn't find where the screenshot was being stored in the emulator. So, I tried it in a real device and there is no issue. All the borders appears to be perfect.
t
Okay, excellent. Carry on!
😃 2
n
Thank you so much 🙃
a
Just here to say big up @tad for helping out the way you did. The way you helped in this scenario should be an example to many
💯 2
❤️ 5