画面上の領域に触れるとImageView
、タッチ領域に表示されるようにします。イメージビューの例は次のとおりです。
ImageView image = (ImageView)findViewById(R.id.image);
以下の方法を使用して、画面の領域タッチで画像を設定するにはどうすればよいですか。また、新しい領域をタップすると、前の画像が見えなくなります。
@Override
public boolean onTouchEvent(MotionEvent event, view) {
final int action = event.getAction();
final int x = (int) event.getX();
final int y = (int) event.getY();
boolean result = false;
}