layout_large android studio - android

I am new to android. I am following this tutorial in android studio. Actually, that tutorial is developed in eclipse.
In that tutorial, I need to have layout_large. But I don't see that in android studio. So, I create layout_large as android resource directory and try to add xml file. But, I can't add there because I don't see layout resource file. How can I add layout_large in android studio?
I am just following this tutorial. http://www.newthinktank.com/2013/08/android-development-17/

Call context menu on res folder and choose New->Android resource directory.
In the dialog choose Resource type to layout and add to Directory name "-large".
Then copy layout you want to change from res/layout folder to layout-large.

Related

Android Studio: Drawable Folder adding subdirectory or create new folders issue

I am trying to do one of two things
add subdirectory to the drawable folder, as I have away team and home team that need to be in separate folders.
It seems that it can not be done.
So I am trying the following where I create 'top' folders like aTeam and hTeam by adding New Resource Directory and give them the name of aTeam and hTeam with the resource type of drawable.
The folders are created in the project folder structure but they are not being displayed in the android studio project and I can not reference them?
does anyone know what i am doing wrong?

What is the Android Studio's Default Qualifier for Layout Resource Directory?

Creating a project in Android Studio with an Empty Activity would produce a project with an existing layout resource directory.
If I create a project without an activity and decide to add an activity later, I'll need to create a layout resource directory to put the layout file in there. Before it's created it needs a qualifier.
Is Android studio using any default qualifiers when creating an xml layout for the Empty Activity project?
In the image below you can see the window where IDE is asking for the qualifier.
As per investigation, I found out the Layout Resource directory I'm talking about is just a normal directory like a folder added to a project. The layout XMLs in projects created with an empty activity would be put in a normal directory without qualifiers.
In case you created a new Blank Activity, and you want to add new layouts for activities with a default qualifier you have two options
Manualy create directory
You can just create a directory in your project:
app/src/main/res/layout
About the Android project structure:
https://developer.android.com/studio/projects/#ProjectView
Resource types specificly:
https://developer.android.com/guide/topics/resources/providing-resources#ResourceTypes
New Resource Directory Wizard
You can also do it in the Android Studio, the way you posted in the question.
Select: File -> New -> Android resource directory.
I am pasting a screenshot so you can see my Android resource directory wizard where I am allowed to create default resource directory. See I do not need to explicitly to select any qualifier, I don't know why is IDE asking you to provide one. Maybe its because we are using different version of Android Studio.

Android Studio newly created folders not showing

I am using Android Studio 2.1.1 (currently the most updated stable version).
I created new directory inside 'res' by name "values-21"
and it don't shows up.
But if I go to the physical location of 'res' on the hard drive I can see that its exist.
and of course I checked using both Android and Project Files structure but either way its not showing it.
I wanted to check where is the problem so I created another directory by name "menu", and the last one was shown.
just to be sure I tried to create the same directory again ("values-21") but Android studio didn't allowed it because this directory allready exist's.
any ideas how to fix it?
Update - the solution is to create new directory using the "Android resource Directory" option and not by "Directory" option.
all you values xml files stored in values, values-21, values-mdpi or other physical folder in AndroidStudio displayed in one res/values folder.
It will not show until you copy a XML file into values-21, android studio consider all values folders to be of same family and it shows only one folder and the files with post script of the family in which it lies.
copy some layout file from resource directory and through windows explorer paste in that the folder that you have created i.e values-21 and now come back to android studio and check the folder should be there.
Happy coding

I can not create within the a layout-small folder a xml file

I have android studio 1.3.1 and I have a problem in creating a xml file within the layout-small or layout-normal and etc.
For example when I right click on the res folder and I can create a layout-small. But after from that, I have no the layout-small folder still in the android studio but I have it in within the res folder in my project. for more information please see the following image:
With this condition, I can not design for other screen sizes!!! Are there a solution for this problem.
Android Studio support multiple view for project structure. By default "Android" view is selected. "Android" view display files by combining with resource type.
To see all files as directory listing we need to switch to "Project Files" view.
Click "Android" and from popup select "Project Files"
I think in android 1.3.1 somethings is different. For example in older version of the android studio we can not create two xml layout with a similar names in a folder, and we should create separate folders for each layout-small size and etc. But I think in android 1.3.1 we can create two xml file with a similar names in a folder. Please see the following image and say if I wrong.

Android studio : Creating a normal xml file in assests folder?

I've been trying to create a normal XML file in Android studio for manual RSS feed but android studio not letting me to create it. I just started using Android studio & migrated from eclipse.
Here's the options for File->New
In fact, it is simple. You need to put "ordinary" xml file inside "raw" folder and you can create it by clicking new->file and setting its name to rss.xml for example.
If you dont have raw folder then right-click on res->new->Android res directory select resource type to raw and click ok

Categories

Resources