On the following image I would like to detect what part of the human body the on touch event happened. My idea was to have a GridView and determine the position of the human body where the touch event happened. A GridView seems an overkill though. Would it be a better approach with a different layout ?
gridView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
public void onItemClick(AdapterView<?> parent, View v, int position, long id) {
BodyImage item = (BodyImage) parent.getItemAtPosition(position);
switch (position) {
case 0:
// code for head
break;
case 1:
// code for nose
case 2:
// code for n-human part
Here is the image to give the audience an idea enter image description here