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 Build a Simple Android App Creating the Screen Layout Adding a Button

The text and button are appearing on top of each other when I run the app, even though in the design screen show dif..

The text and button are appearing on top of each other when I run the app, even though in the design screen show different. They overlay each other on the upper left hand side the screen. Does anyone have any suggestions on how to correct this. Using Android Studio as directed by the video.

5 Answers

Hi

In the Design view, above the phone/tablet window there is a few icons.

From the right: An eye (Hide constraints) A magnet(Turn of autoconnect) etc...

Press the 4th one. (Infer constraints). Run your program.

It worked for me.

Thank you so much!

Thank you So much.

Thanks alot big help ;)

Thank you!! I was getting so frustrated by this.

Worked for me as well!

Thank you ! It worked for me as well..

Why does this work? can someone explain what 'infer constraints' does, exactly?

Looks to me like it properly configures the constraint layout according to some default action. This tutorial was made before the constraint layout existed so that would explain it.