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 trial

Android Build a Blog Reader Android App Rebuilding from Scratch Handling a Lack of Data

handling a lack of Data

Now add the android:layout_width and android:layout_height attributes and set both equal to the value that shrinks the Button around its content (the text on the Button, in this case).

for the answer- android:layout_width="wrap_content" android:layout_height="wrap_content"

then what is going wrong with this problem.

1 Answer

Daniel Hartin
Daniel Hartin
18,106 Points

Not sure but have you added the button in as a new element in the xml file? Under the parameters for the relative layout start a new line and type

<Button android:layout_height="wrap_content" android: layout_width="wrap_content"/>

(Don't forget to close the button with />)

Hope that helps