<Color where the user touches the screen - kotlin ...
# stackoverflow
r
Color where the user touches the screen - kotlin android I have this function that allows the user to paint on the screen. It works correctly in the emulator; where I touch, the screen is painted. However, when I tested it on my tablet, it is very offset. If I click in the middle of the screen, it paints in the bottom right corner. Does anyone know how to fix this offset? private fun handleTouch(event: MotionEvent): Boolean { val drawable = drawable ?: return false // Calcule as coordenadas corrigidas val imageWidth =...