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 trialMeet Jethwa
Courses Plus Student 234 Pointsthe properties menu does not show up on the side how do i get it
while editing the layout the properties menu does not show up
7 Answers
Steve Hunter
57,712 PointsJust got round to checking that in code. It works fine.
I've added a member variable for the layout, of type RelativeLayout
, then assigned an id to the layout in the XML.
Here's my adjustments to the Fun Fact app ...
<RelativeLayout ...
.
.
android:id="@+id/layout">
// at the top of the class
private RelativeLayout mLayout;
// in onCreate
mLayout = (RelativeLayout) findViewById(R.id.layout);
// after onClick
mLayout.setOnClickListener(listener);
That works fine.
Steve.
Steve Hunter
57,712 PointsHi Meet,
On the right, there's the component tree with Properties too. On my version of Android Studio, I can show/hide this by clicking the words "component tree" in the side bar.
Let me know if that helps,
Steve.
Meet Jethwa
Courses Plus Student 234 Pointsyeaah thank you that helped
Meet Jethwa
Courses Plus Student 234 Pointscan you help me with the code to change the color of the background everytime you tap the screen
Steve Hunter
57,712 PointsSure! What's the problem with that?
Let me have details and I'll help you out.
Steve.
Meet Jethwa
Courses Plus Student 234 Pointsi want to make an app that when you touch the screen the color of the screen changes
Steve Hunter
57,712 PointsOK. That's pretty straightforward. Have you done the Fun Facts app course? That has that functionality.
Meet Jethwa
Courses Plus Student 234 Pointsyeah but i dont want a button just tapping the screen should change the color . how do i do it i have been trying since 6 hours
Steve Hunter
57,712 PointsI see. I'm out at the moment; let me have look when I get home.
Meet Jethwa
Courses Plus Student 234 Pointsok thank you for the support .i will wait for your reply
Steve Hunter
57,712 PointsHave you tried adding the onClickListener
to the Id of the layout? That should work.