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 an Interactive Story App User Input Using EditText for Text Input

Layout is different in an actual device

When I run my app in my actual device the result is different. My device resolution is 1080 x 1920.

actual device:

Imgur

layout:

Imgur

1 Answer

Hi. That's perfectly normal as the screen sizes and aspect ratios are different. If you want to run the app on an emulator that is more similar to your actual phone, you might want to select a Pixel 2 XL. The aspect ratio of the 2 phones is different: 16:9 for the Nexus 5 (your current emulator) and 18:9 for the Pixel 2 XL (closer to your phone's aspect ratio), which explains the larger "gap" between the image and the edit text on your actual phone.

Hope that helps :)

Hi hanks for the answer. What would I do so that it will look the same in any devices?