How to get dens.xml (sw600dp) in Android Studio?

I have inherited the values folder structure shown below.

enter image description here

For more than an hour, I searched Google and looked and shot the menu in Android Studio 1.2.2 and tried to create files and folders, but nothing I did allows me to add, for example, dimens.xml (sw720dp) .

I removed the dimens.xml (sw720dp - landscape) because landscape did not fit my needs.

What steps did the one who created the folder structure take in order to get the dimens.xml (sw600dp) to display in the structure?

What steps need to be taken to get the file dimens.xml using the sw<N>dp file naming convention? How do I get the dimens.xml (sw720dp) where does it belong?

You can ignore the rest of this. I just show that I have TRIED, none of which work correctly.

Should I right-click values or dimens.xml (2) ? What then?

Here is what I did and it did not help:

enter image description here enter image description here

I also tried:

enter image description here enter image description here

EDIT

I also tried copying the sw600dp file. Bad luck:

enter image description here

IT CANNOT BE IT SAME.

+6
source share
2 answers

What steps should I take in order to get a file with a dimension.xml with a swdp file naming convention?

First, you are likely to be happier with life if you change the drop-down menu above the project tree from "Android" to "Project", which will show you the actual file system of your project.

To add a resource directory from Android Studio:

  • Right click on res/

  • Choose Create> Android Resource Directory from the context menu to open the New Resources Directory dialog box:

Android Studio New Resource Directory

  1. Select a resource type from the Resource Type drop-down list (in this case, values )

  2. Click on your desired qualifier (in this case, "Smallest Screen Width") in the "Available Classifiers" list.

  3. Press the button →

  4. In the field that appears, enter your numerical value (in this case 600)

  5. Click OK to close the dialog box and create the directory.

To add a dimens.xml to this directory, right-click on the newly created directory and select New> Value Resource File from the context menu.

+9
source

I had a lot of failures that tried to make music OUTSIDE Android Studio, but this time I succeeded:

enter image description here enter image description here

Now I will see how @Commonsware says that I could do this.

EDIT

And as always, @Commonsware gave me tips with good advice (I have no idea when and why and how I lost the File structure tab "on the left).

Here is what I see now, and (I was right :) It is NOT DIFFICULT to see what to do ONLY YOU TO SEE THIS:

enter image description here

And, following his advice, I get here and am ready to create a file of a dimens.xml that goes inside:

enter image description here

+1
source

All Articles