@Override
public boolean onTouchEvent(MotionEvent event)
{
// TODO Auto-generated method stub
x=(int)event.getX();
y=(int)event.getY();
if(MotionEvent.ACTION_UP == event.getAction()){
i=x;
j=y-200;
// 加以下4行代码 ,就不能显示坐标值了,bug
pixel = bmp.getPixel(i,j);
red= (pixel & 0xff0000) >> 16;
green= (pixel & 0xff00) >> 8;
blue= (pixel &0xff);
//
// showInfo("RGB"+pixel);
showInfo("你点击的坐标为:("+x+","+y+")"+red+","+green+","+blue+"\n"+"再次点击返回界面");
// notice.setText("您点击的位置是:\nx:"+x+"\n y:"+y);
}
return super.onTouchEvent(event);
}
这是我的代码,加上getpixel 程序就死掉了,求大神帮助,很急的