Search code examples
javaandroidandroid-studioandroid-fragmentsandroid-activity

Why Design(activity_main.xml) and actual app look different?


i am new in Android development in java

my activity_main.xml file is look like this activity_main.xml design

But when i run this application in my pixel 3 phone than it's look's likepixel 3 phone

why this design are different ?


Solution

  • As seen in background, you ignore missing constraints. When working with ConstraintLayout you must provide at least one horizontal and one vertical constraint, otherwise views could jump, and I believe IDE gave u that error.