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 an Interactive Story App (Retired) Finishing the User Interface Customizing a Button

In the layout below we have one button. Add an attribute to set its background to #ffaa0000.

im not sure what to do from here

activity_main.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <Button
        android:id="@+id/thrustButton"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:text="@string/thrust_label" />

</RelativeLayout>

8 Answers

I figured out how to change my profile image on my iPad so I cose a new villan, I don't think this is offensive unless there are any rebels nearby. Also I wasn't the one who wrte the sarcastic comments some other kids hacked me because I didn't sign out. Sorry.

Great choice! :-)

Thank you.

Steve.

Adding android:background="#ffaa0000" to your button element will change the background color.

Oh thanks that helps a lot now I understand

spaghetti

Michael Wiss
Michael Wiss
19,233 Points

Change your profile image Jacob.

Jacob,

Could you change your profile image, please.

Thanks,

Steve.

Change it now! its offensive

Hi Jacob,

Can I refer you to the following clause regarding the acceptable use of this website:

When using this Website, you must not do any of the following: publish, post, distribute or disseminate any defamatory, infringing, obscene, indecent, offensive or unlawful material or information;

That is just one obvious one to pick out.

Can you change your profile picture, please. It is offensive to a reasonable person. It is most likely unlawful in many jurisdictions too. Either way, it is just easier if you could change the picture. This website is not a political forum for any views, however mainstream or extreme.

Thanks,

Steve.

Ok I'll change it tomorrow I can't really figure out how to do it on my iPad I'll have use of a computer tomorrow

Thank you Jacob. Please change it to something non-inflammatory, eh.

I'll let the Treehouse guys know once you've done that.

Cheers,

Steve.

Here is the solution to this problem;

android:background="#ffaa0000"