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 trialkenikeako
1,785 PointsI don't understand the mEmptyTextView. Where is that coming from?
I don't understand where the emptytextView is coming from. Where was this declared in the XML.
1 Answer
Moira Lawrie-Martyn
8,073 PointsWhen you're setting up the listview in the layout file, you'll have a listview with the id @android:id/list and a text view with the id @android:id/empty. Android will automatically throw list information in the listview with that id. The other is if there's no list to show, which is where the mEmptyTextView comes from. You can change what the text says by accessing it through that variable.