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 trialshemar anderson
Courses Plus Student 688 PointsHow to add logout button in Android studio
How to add logout button in Android studio
2 Answers
alex gwartney
8,849 Pointswell the first thing you would want to do is to set up something like parse if you are using a back end service. But to just get a simple button just got the xml view and drag a button widget on the screen give it a id and then in your on create method you can make a on click listner. The on click listener then would set up for the functionality for logging a user out once you set up some sort of log out code.
Jacob Bergdahl
29,119 PointsFollow along the track and this will be covered. The Ribbit project will teach you all you need to know about logging users out.