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 trialAyush Bhargava
791 PointsMy set on click listener is in red and listener is underlined in red
this is my line 30 where the errors are showFactButton.setOnClickListener(Listener);
2 Answers
Ollie Prentice
11,685 PointsI think it might be a problem with case. Inside the bracket try a lower case 'l' on listener.
showFactButton.setOnClickListener(listener);
Ayush Bhargava
791 Pointsit didn't work
David Anton
Courses Plus Student 30,936 PointsDavid Anton
Courses Plus Student 30,936 PointsI think you used the listener variable in Anonymous function, that's mean you have to type final before the declaration of listener.