I’ve made the table to make rows dynamically. I’m trying to make onTouch event, and if it triggers then move on to another activity using intent. I can’t make it to work it says:
The method setClass(Context, Class) in the type Intent is not applicable for the arguments (new View.OnTouchListener(){}, Class)
I’ve tried changing THIS to the name of the class, but It can’t be found.
Here is the code
TableRow row = new TableRow(this);
row.setOnTouchListener(new OnTouchListener() {
public boolean onTouch(View v, MotionEvent event) {
Log.d("TAREA_TOUCH", tarea.getIdtareasr() + " TO");
Intent intent = new Intent();
intent.setClass(this, EditarTarea.class);
intent.putExtra("id", tarea.getIdtareasr() + "");
startActivity(intent);
return true;
}
});
Or