简体   繁体   中英

Using an intent to start new activity from ListActivity

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?

Intent intent = new Intent(NameOfYourListActivity.this, OtherActivity.class)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM