I inherited the values
folder structure shown below.
For over an hour I've Googled and looked and pulled down menus in Android Studio 1.2.2 and tried creating files and folders but nothing I have done lets me add, for instance, dimens.xml (sw720dp)
.
I deleted dimens.xml (sw720dp - landscape)
because landscape
didn't suit my needs.
What steps did whoever created the folder structure take in order to get dimens.xml (sw600dp)
to appear in the structure?
What steps do I need to take to get a dimens.xml
file with the sw<N>dp
file naming convention? How do I get dimens.xml (sw720dp)
where it belongs?
You can ignore the rest of this. I'm just showing that I've TRIED stuff, none of which works right.
Am I supposed to right-click values
or dimens.xml (2)
? What then?
Here's what I did and it didn't do as I need:
I also tried:
EDIT
I also tried copying the sw600dp
file. No luck:
IT CAN'T BE THIS HARD.
What steps do I need to take to get a dimens.xml file with the swdp file naming convention?
First, you will probably be happier with life if you change the drop-down above your project tree from "Android" to "Project", which shows you an actual filesystem view of your project.
To add a resource directory from within Android Studio:
Right-click over res/
Choose New > "Android resource directory" from the context menu to bring up the New Resource Directory dialog:
Choose your resource type in the "Resource type" drop-down (in this case, values
)
Click on your desired qualifier (in this case, "Smallest screen width") in the "Available qualifiers" list.
Click the >> button
In the field that appears, fill in your numeric value (in this case, 600)
Click OK to close the dialog and create the directory
To add dimens.xml
to that directory, right-click over the newly-created directory and choose New > "Values resource file" from the context menu.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With