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

Farouk Charkas
1,957 PointsHow do I make a button go to another Page/Layout in Android Studio?
I understand how to make the button change a string but how do I make it go to another layout/page?
1 Answer

Michael Makali'i Fernandez
8,090 PointsIn your button's event handler use an intent to get to the next activity. For example:
Intent intent = new Intent(this, TargetActivity.class);
startActivity(intent);
An important thing to remember is to add the TargetActivity to your Android Manifest file as well:
<activity>
<android:label="@string/app_name" android:name="TargetActivity"
<activity/>
Farouk Charkas
1,957 PointsFarouk Charkas
1,957 PointsMay you dummy it up a bit?
Jon Kussmann
Courses Plus Student 7,254 PointsJon Kussmann
Courses Plus Student 7,254 PointsHi Evering,
I'm not sure how far you are in the Android track, but you should pretty quickly learn how to start a new activity from a button click, which is generally how you show a new page.
Farouk Charkas
1,957 PointsFarouk Charkas
1,957 PointsWhere do you learn that in the track? If you know? I would greatly appreciate it!
Farouk Charkas
1,957 PointsFarouk Charkas
1,957 PointsWhere do you learn that in the track? If you know? I would greatly appreciate it!