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
Andreas Robichaux
2,426 PointsChanging bg of image view with button click
I am making a portfolio that has several links and depending on what link you click from the main activity it will load different content, or thats the goal.
I want to have the main image header on the second activity but with a small bar underneath of solid color , depending on what section. (the color from the button on the previous activity).
Is there a way I can fill in the bg value to something like "subColor" a string variable that fills with whatever 6 digit color code it needs?
right now I was messing with just trying to get it to show by using one variable and i put "string/webColor" as the bg input on the design menu and then it auto-fixed by having me add a value called webColor with the hex code...it seems to work if I put padding on but how can I do this so that it is different depending on what button you press in the previous one??
THANKS TO ANYONE WHO HELPS AHEAD OF TIME MUCH LOVE!!!