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

Niranjan Deodhar
PLUS
Niranjan Deodhar
Courses Plus Student 1,941 Points

Button width and height settings

Is there some bug in the code checker for this step? The following simple statements are giving errors: I added the ID and text lines as well just in case, but technically I should only need t he button creation and the width and height settings:

<Button> android:id="@+id/button1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="dummy text" </Button>

2 Answers

Stone Preston
Stone Preston
42,016 Points

hmm you have a <button> and <button/> tag. try putting it inside one <button /> tag like so:

  <Button 
      android:id="@+id/button1"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="dummy text"

         />