320X480 PNG 이미지가 있습니다.

첫 화면에 이미지를 풀스크린으로 띄웠습니다.

그리고 터치가 일어나는 좌표에 따라 인텐트 호출을 달리 했습니다.


public boolean onTouchEvent(MotionEvent event) {

    

    int pointerCount = event.getPointerCount();

    float x, y;

    if (event.getAction() == MotionEvent.ACTION_UP) {

    if (pointerCount == 1) {

    x = event.getX(0);

    y = event.getY(0);

    if (y>84 && y<144) {

    if (x>34 && x<84) {

    Intent intent = new Intent(ListViewExample.this, FList1.class);

    startActivity(intent);

    }

else if (x>103 && x<151) {

    Intent intent = new Intent(ListViewExample.this, SList2.class);

    startActivity(intent);

    }

}

...


}

}

}


뭐 이런 식입니다.

여기서 걱정되는게 절대좌표 84,144,34, 84 등을 쓴게 해상도가 다른 폰에서는 잘 동작할까 하는 점입니다.

스마트폰 해상도가 바뀌면 이 좌표도 바꾸어주어야 하는지요.