1

my ListActivity has a button on the bottom that I want to use to fire up a new activity using an intent. When I tried saying Intent intent = new Intent(this, OtherActivity.class) I'm getting an error that the constructor is undefined. FWIW, the other activity extends MapActivity. Not sure if that matters...

What do I need to do to get this to work?

LuxuryMode
  • 33,401
  • 34
  • 117
  • 188

1 Answers1

4
Intent intent = new Intent(NameOfYourListActivity.this, OtherActivity.class)
Rocket Nikita
  • 470
  • 2
  • 7
  • 20
Cristian
  • 198,401
  • 62
  • 356
  • 264
  • @LuxuryMode I'd definitely look at the link provided by kgiannakakis to get further explanation as to why it wasn't working. – Maximus Apr 18 '11 at 16:48
  • @LuxuryMode +1... this has been explained a lot of times so I didn't pointed out the reason :) Thanks for the advice. Lol, I was the one who answered the question provided by kgiannakakis XD – Cristian Apr 18 '11 at 16:52