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
Peter Corletto
2,682 PointsHow to incorporate an EditText or textbox on an OnClickListener?
Hello, I am a new student. I am really enjoying the course and the pace is right for me. I just added an OnClickListener to my Fun Facts app so that it updates the label or TextView when the showFactButton is clicked. I am a very curious learner, and I wish to know the following:
I would like to add an EditText or textbox component to my app, that asks the user for something, like, "Enter your name". Then, when the button is clicked, I would like the app to capture whatever the user entered on that textbox, and display it on the screen, like: "Hello, (your name)".
I don't know if this will be covered in later sections, but this is something I've been longing to learn.
I was actually enrolled and trying another Android Dev course and I discontinued it, because their pace is too fast, and they don't explain as clearly and in detail as the instructor in Treehouse explains.
If any students know how to do this, or an instructor or coach could please tell me how to get this done, I would be very happy.
Thank you very much.
Regards,
Peter
2 Answers
Derrick Shepherd
4,861 PointsThe exact thing you're looking to do will be covered in the lesson.
Peter Corletto
2,682 PointsThank you Derrick!
Derrick Shepherd
4,861 PointsYou're welcome Peter! Best of success to you!