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 trialSahil Ambardekar
10,306 PointsMargin Error
In the video, it was mentioned that there was an error when setting the margin in the xml file and that it looks different than the preview. Why is this and how can we know when there will be an error? Also, what type of error is this? Why does the preview not accurately depict the actual screen?
1 Answer
Ozhan Saat
Courses Plus Student 4,002 PointsThe preview is just a tool that gives you a rough idea of how the screen will look. To make the preview function more accurate would probably slow android studio down a lot. When I first started learning android I relied on the preview too much but now I never use it. Instead I have my phone connected to my computer and test any changes that way.