For example
Intent intent = new Intent(this, SecondActivity.class);
eclipse error: The method setClass(Context, Class) in t
Shubhayu's answer is correct, but I just want to make clear for anyone who see this question that this
and Activity.this
is the same if you are using it directly in the activity.
This is answered here
Example:
@Override
protected void onResume() {
super.onResume();
Log.d("Test", this.toString());
Log.d("Test", MainActivity.this.toString());
}
Result:
D/Test: com.example.app.MainActivity@e923587
D/Test: com.example.app.MainActivity@e923587