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!

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

Android Build a Simple Android App (retired 2014) Pretty Little Things Positioning Text Using a Linear Layout


Hey there :) im getting this error : Description Resource Path Location Type Suspicious size: this will make the view invisible, probably intended for layout_height for this line: android:layout_width="0dp" --THIS android:layout_height="wrap_content" inside of a TextView In a linearLayout

1 Answer

Daniel Hartin
Daniel Hartin
18,106 Points

if you set your layout_width to 0dp (zero density pixels across) nothing will be displayed regardless of what information is entered. To remove the error you could use android:layout_width="wrap_content" or android:layout_width="match_parent".

To be honest without knowing what you are trying to achieve it is a little difficult, just try messing around with the 2 possibles above to see the difference, one will wrap the text box to the size of the content or text that is entered the other will make the text box as wide as the device it is viewed on.

Thank you Daniel :) will try