This week's book giveaway is in the Agile/Processes forum.
We're giving away four copies of Building Green Software: A Sustainable Approach to Software Development and Operations and have Anne Currie, Sarah Hsu , Sara Bergman on-line!
See this thread for details.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Layout in android studio and on my phone display differently.

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there,

I am using android studio and am currently working on my own app but i noticed something that doesn't make sense.
My layout in android studio looks different than on my phone when i actually run the app.

Some buttons or textviews display slightly more right or left etc. than it displays in the layout editor in android studio.
The only way i can get them to display in the correct positions on my phone is to actually position them in the wrong places in android studio.

My screen size in android studio is set correctly and matches my phone's display so i don't know why this is happening.

Any advice?

Thanks.
 
Bartender
Posts: 1868
81
Android IntelliJ IDE MySQL Database Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is the SDK level (Android version) used for your program in Android Studio the same as your physical device?
Have you gotten around to use the HDPI, LDPI layout directories?
What is the type of view for your root view?
How are you positioning the elements (absolute, relative)?
How are you spacing/placing the elements using DP, Pixels, etc?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic