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
Avi Barit
Front End Web Development Techdegree Student 5,236 PointsCannot change parameter values for view objects in android project using eclipse on mac
Hi everyone. I'm a novice so I don't know if I'm doing anything wrong. When I try to change the parameters for the textview in an android project it does not allow me to type in anything into the parameter field.
Any ideas?
6 Answers
Ernest Grzybowski
Treehouse Project ReviewerWhat do you mean parameters? Can you please show some code you have tried?
To change the text of a TextView try the code below:
TextView my_text = (TextView) findViewById(R.id.textview1);
my_text.setText("Hello World!");
Avi Barit
Front End Web Development Techdegree Student 5,236 PointsHi,
In the lesson "customizing buttons and labels" in the simple android app series of videos, Ben Jakuben says that you can change the properties of the textview in the properties view. He then changes them by selecting the properties he wants to change and then typing in the new values. However on eclipse when I click on the boxes they don't allow me to type in the new values.
This problem is in the graphical layout, properties section of eclipse.
Ernest Grzybowski
Treehouse Project ReviewerIt is not possible to click on a view and update it's text. Please right click the view to see if you can find where to edit the text. The graphical layout is just that. To graphically layout your views. Not too much functionality is built in to change different properties of views in the graphical layout. To do that, open the properties window, or just use the xml. Let me know if you have trouble with any of that. Thanks
Avi Barit
Front End Web Development Techdegree Student 5,236 PointsOkay, sorry if I'm not explaining myself clearly. I have found that I can change the properties in the xml but for some reason it won't let me change the properties by typing in the properties view. Any ideas? Perhaps just a setting that I need to change.
Ernest Grzybowski
Treehouse Project ReviewerIf you are changing them in the properties window pane, be sure to press enter after you type your new property. This has been one of the most finicky parts for me also, but I do most of my editing in XML.
Ben Jakuben
Treehouse TeacherHi Avi Barit,
I'm posting my reply to your Help ticket in here for future reference, too:
It sounds like you're bumping into a known issue. There are some notes on the video page that talk about it:
"Known Issue: On Mountain Lion, you are unable to edit certain properties in the Properties view, like Text Size for the TextView. The workaround is to right-click on the TextView and select Edit TextSize."
You can also search for help in our forum. Here's a post that might be of assistance: https://teamtreehouse.com/forum/cannot-change-textview-size-graphically-when-using-eclipse-for-android