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

Gary Buys
Gary Buys
3,379 Points

Having trouble editing properties

I am having trouble changing the properties of buttons and text in the properties window of my graphical layout editor. Every time I try to set something like textsize the parameters stay blank. Is there a setting in Eclipse that will allow me to manually change these?

8 Answers

Ryan Bend
Ryan Bend
5,951 Points

I had the same problem, did some googling and came up with this.

Load up the Android SDK Manager, it should be under the 'Window' menu in your menu bar at the top of Eclipse.(If not make sure you're using the "Java" perspective)

From there scroll down until you see Android 4.3, you want to install the SDK Platform and the ARM EABI v7a System Image, at least those are the ones I used.

Once that's done you might have to restart eclipse.

Now when you're in the graphical editor tab of the activity_main.xml look for a little Android alien with the number 19 beside him. It should be at the top of the main window with your app preview.

Click the down arrow beside it and change the number to API 18: Android 4.3.

No idea why this works as it's supposed to only change the way that it renders the layout but it worked for me. Let me know if you need any clarification or if it still won't work.

Ben Jakuben
STAFF
Ben Jakuben
Treehouse Teacher

What Ryan said! I just came in here to post the same solution (see this post for a screenshot).

Gary Buys
Gary Buys
3,379 Points

Thank you both!

Great solution. Way to go!

Kate Hrycak
Kate Hrycak
5,542 Points

So I went the long way around and figured out what to put in activity_main.xml instead of using the graphical interface for the first video: customizing buttons and labels. The only thing I can't get working properly on my device is the italic font.

TextView

    android:gravity="center_horizontal"
    android:textColor="#ffffff"
    android:shadowColor="#ffffff"
    android:shadowRadius="10"

and then Button

    android:textSize="24sp"
    android:textStyle="bold|italic" 
    android:fontFamily="sans-serif"
    android:textColor="#3f0f7f"

Any thoughts on the italic? Cheers!

Kate Hrycak
Kate Hrycak
5,542 Points

Actually, looks like it's just my device that isn't italicized... looks fine on the emulator. Weird.

I tried Ryan's solution and suddenly I am unable to start Eclipse. It looks like it has been uninstalled and it expects me to unpack 1.3 gigs worth of files. I try to do this and after it has spent several minutes it tells me there is some problem relating to the path. Argh!

Ben Jakuben
Ben Jakuben
Treehouse Teacher

Hopefully we can help. Where did you download Eclipse from originally? Is it the Treehouse bundle?

How does it look like it's been uninstalled? Can you take a screenshot or copy an error message? You can upload a screenshot somewhere like imgur.com and paste the link in here.

If all else fails, don't worry, you won't lose your work. Your projects are saved in the "workspace" folder (wherever you have created it) and you can uninstall/reinstall Eclipse over and over and just use the same workspace. You just need to make sure you don't delete the workspace folder.

Thank you. I managed to figure this out. I like your customer service.