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 trialVictor Wooding
12,430 PointsWhere do i place the intent method for the flight activity challenge? Do i create the method outside of the OnClickListe
Also what is the name of the activity that i want the button to jump to? Or is this supposed to be done in one line of code?
1 Answer
Gabriel E
8,916 PointsThe action you want is something like an event trigger. If you want to jump, I personally would implement an OnClick();
Victor Wooding
12,430 PointsVictor Wooding
12,430 Pointsthe onclick is already there.
mLaunchButton = (Button)findViewById(R.id.launchButton); mLaunchButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // Add your code in here!
} }