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:




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?