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 a Simple Android App (2014) Creating the Screen Layout Using a Fullscreen Theme

Two dimens.xml files

I have two dimens.xml files, under a dimens.xml folder files in my Android studio.

dimens.xml (2) --dimens.xml --dimens.xml (w820dp)

Now I get that the two files correspond to different resolution phones. But when is which one used? Can I create more than 2 myself or does the studio auto create them? What does the w820dp mean? and some other details please....

2 Answers

It looks like android studios leaves a comment as to why there are two dimens.xml files. In the second dimens.xml file (w820dp) it states you can create customized dimens.xml files for different screens sizes.

Though after looking it up I read it is not suggested unless you are absolutely sure you know what you are doing. (IE you may end up making a bunch of useless extra code that could have been done with a more standard approach)

I would go more in detail on it, but sadly I do not know much about it myself. I hope someone else can give us some better insight on this!

Ah. Thanks, this is what I figured out it would be for. There was a little talk about it in the next videos of this track too, but not in detail.