• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

help please

 
shivam singhal
Ranch Hand
Posts: 231
Java Notepad Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am working on selection of a square in the grid (in sudoku appication), when user touches the box..
first of all , i am calling (MotionEvent event)
and then call event.getX() which returns x coordinate of the selected area this is what we needed, then why we divide it by width of a square?


event.getX() / width
 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As with your other topic, you do not provide any context so the question is impossible to answer. A guess about the intent would be to get the X index of the grid square being clicked on.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic