Android Build a Simple Android App Creating the Screen Layout Adding a Button

When I run the emulator the text I created is partly off screen.

Part of one word is off screen.

4 Answers

Ben Jakuben
STAFF
Ben Jakuben
Treehouse Teacher

This has happened to me! You should be able to resize your emulator and make it fit on the screen simply by clicking and dragging from one of the corners.

Ben Jakuben
Ben Jakuben
Treehouse Teacher

I must have read your question wrong because my answer doesn't make sense. I thought you were saying part of the emulator is off the screen. Sorry!

About the text, it sounds like something in your layout is sized or constrained incorrectly. Can you paste in the XML layout code from your activity_main.xml?

Yeah it was in the layout. I had to stretch the dialog box out to see all the words.

I ended up having to change the layout_width property to "wrap_content".

Osvaldo Restrepo
PRO
Osvaldo Restrepo
Pro Student 483 Points

It's about the constrain dude. When you click it in the Design View. There are 4 little dots (I don't know how else to call them). It's one up, one at the right, one down, and one at the left. They are of grey color. Clic and drag them to the edges. Each one of them. That's the constrain problem. That's how I fixed mine. I'm newbie too, just helping.. greetings!