I have an activity in which there is an ImageView . What I want to do is draw where the user touches this ImageView with the image from the drop-down folder. I read that the best way is to use Canvas, but I'm not sure where and how I integrate the onDraw method with onTouchListener . This is what I have so far:
public class Main extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); final TextView textView = (TextView)findViewById(R.id.textView); final ImageView image = (ImageView) findViewById(R.id.imageView2);
So what I want to do, when the user touches the ImageView , the image will be drawn exactly where he touched it.
source share