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 trialsachin Madishetty
453 Pointssir why do both the textview have id
and 2nd textview have more properties than first
1 Answer
Mahmoud Yousif
5,053 PointsNot really sure if I fully understand your question, but I will answer based on what I think you asked. One reason is that when you use a relative layout, you position views relative to other views, so it's convenient to have an easy ID to refer to these views for positioning the views. Another reason is that its always good to associate views with ID's, because when you go into your code later on, you can manipulate them as you like to add more to the experience. Take this project for example, with the first textView ID you created, you could set it to change the fontSize or fontColor of the "Did you Know?" text. The actual project doesn't ask you to do that, but you can if you would like to.