Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android Build an Interactive Story App (Retired) Intents and Multiple Activities Adding a Second Activity

Stephen Little
Stephen Little
8,312 Points

Have to change the Story Activity class to make things work...

I had to change the line

public class StoryActivity extends ActionBarActivity

to

public class StoryActivity extends Activity

and then import Activity to make the app work, I had to do this when I made a new activity page as well. Am I going to have to do this with every page and if so why? I don't understand ... is it because I'm using then newest version of android studio ?

Any thought would be great , thanks

1 Answer

Daniel Hartin
Daniel Hartin
18,106 Points

Hi Stephen

As standard android studio assumes you want to create an actionBarActivity as it has become the standard for navigation in apps now. Like you say you can simply delete the code you don't need and extend from a regular activity instead of an ActionBarActivity however all of the tutorials on here will work if you leave the other 2 methods in there, it isn't a big deal however I am a bit of a neat freak and I make sure to remove them if for instance I am creating a full screen application that doesn't require an actionBar.

Thanks Daniel