Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Slava Fleer6,086 Points
How to scan for any text in EditText not just OnClick ? (Extra Credit Task)
Hi. I am trying to do the Extra Task for messenger. What I want is to add Send Icon in Action Bar when and only when the EditText is field with some text and removed if I deleting the text.
I tried with OnClickListener but it as said checking with click, so when I removing text , the change would be only on next click. I tried with onEditorAction , but with no luck, probably it for something else.
So if someone know how to do it, I would glad for answers =)
Ratik Sharma32,885 Points
What you're looking for is a TextWatcher. Here is some relevant documentation/examples: