i want to call a new activity from within an inner class which is defined in d class which extends Activity.... the piece of written in one of the methods of that Inner class is::
Intent intent = new Intent(this, Test2.class); startActivity(intent);
Test2 is placed inside the same package as my main clas is placed and eclipse is showing me d error "The constructor Intent(test.MyTimer, Class) is undefined".......
what is the solution??
Just use MyActivity.this
like so:
Intent i = new Intent(MyActivity.this, MyActivity.class);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With