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 trialSteve Hunter
57,712 PointsanswerLabel text has become invisible
I have added the animation to the ImageView and this works fine but I can no longer see any of the predictions.
Is it possible that the animation has been put on top of the text so it is obscuring it? I commented out the animateCrystalBall method call but this made no difference - the text was still invisible.
Any thoughts?
4 Answers
Martin Toth
2,931 PointsHi Steve!
I think your imageView is overlaying (it is on top) of your TextView in your main layout. Try to change the order of the elements of the layout file in the "Outline" editor (activity_main.xml -> Graphical Layout -> Right side of the screen).
The vertical order of this list is representing your elements in the layout BOTTOM-UP (the first item in the list is behind the second one... and so on).
Hope this helps.
Martin
Masum Bergmann
Courses Plus Student 4,129 PointsHi Steve, is your textView inside a linear layout? Check the visibility properties of your linLayout (if you have one) and of your textView. You can set a View's visibility property also programmatically, with something like: mTextContainer.setVisibility(View.VISIBLE);
where mTextContainer has been initialized to the appropriate View.
Also make sure that your code generates an answer and that you call a method to display it. You can always add a second TextView to your layout and see if you can get the answer to appear in that TextView...
Hope that helps!
Steve Hunter
57,712 PointsThanks for the reply.
There's nothing in the XML that changes the Visibility property.
I'll try adding a new View tomorrow. It was all working before so I'm confused as to what I got wrong!
Steve.
Steve Hunter
57,712 PointsThanks Martin ....
My .xml didn't have
android:layout_weight = "0.6"
in it. I've corrected that.
I now have other problems caused by continuing with the course and adding sound etc. I now have other errors but I think my lack of text is probably fixed!
Thank you!
Steve.
Martin Toth
2,931 PointsMartin Toth
2,931 PointsThis is my activity_main.xml: