My layout dirctory starts to be messy. As the java directory, can I create subdirestories for layout? I creates Res subdirectory in studio 1.5. I can see them in the directory, but not through the studio.
I've read Can the Android Layout folder contain subfolders? specially the very good comments from hitch.united but I was wondering if that is still valid with studio 1.5?
why can't I see my created dir through the studio?
The solution you referring to is still valid and still the only way of solving it. And, what's even worse, in Android Studio 2.0 it's still not supported out-of-the-box.
Related
Typically when I use Android studios the project files on the side bar are all nice, organized and clean; having App - (manifest, java, res, assets) Gradle Scripts -
I like when it is like that. But for some reason, every so often when I open a project, typically one that I did on another computer with Android Studios, the files come in all expanded, That is they look like they just came out of the folder looking something like this: .gradle- .idea- app -(build, libs, src, .gitIgnore, app.iml, build.gradle, progaurd-rules.pro) build- gradle- And Still more. It is messy any unorganized. Even more, my namespaces are all expanded, so when I view files I have to expand the folders way out.
Android studios when working the way I like puts the namespaces into one folder, that is there will be a folder that is called com.etc.whatever and it doesn't have to be expanded way out.
So how do I get it back to normal?
You must change your project structure to Packages. it may work.
explore the other option given in project structure.
It is fairly easy to find information on the web that android res hierarchy cannot have subfolders, and that it needs to be flat. However it is not so easy to find as to why. I'm interested in the answer to the question:
Why res folders cannot have subfolders (when developing with Eclipse IDE, as I know it can be kinda hacked around using Gradle with Android Studio)?
I'm currently using eclipse to build android apps, but according to the tutorial, there will file named main.xml in res>layout to create the design of my apps. However my layout is empty.
I had posted about the same issue with extra information, but it was deleted. However, I found a solution so you can get the layout folder populated with the blank activity.
Instead of using the ADT package, download Eclipse and the SDK separately. Follow the details here, but download and unpack the SDK first. Click the DOWNLOAD FOR OTHER PLATFORMS link.
You will also need the location of your java JRE bin folder.
I hope that helps,
Lee.
Create a new project based on a template and everything will be set up as expected. It sounds like you may be new to Android. I would suggest reading through the documentation for building your first app. It will tell you all you need to know.
https://developer.android.com/training/basics/firstapp/index.html
I know where to find the actual Android source for java classes, they can be found on git.
But what happened to the awesome xml files? Those xml files contained style, layout and animation stuff, which is very interesting.
Clicking the "View Source" on the top of this page of this Android class results in git. Obviously.
http://developer.android.com/reference/android/app/Activity.html
But what happens when doing the same on a xml file? Yay, 404!
http://developer.android.com/reference/android/R.style.html
So Im asking: Where can I view those loved xml files online or download the current version?
But what happened to the awesome xml files? Those xml files contained style, layout and animation stuff, which is very interesting.
They are in the git repos. Some are in your hard drive right now.
Clicking the "View Source" on the top of this page of this Android class results in git.
Only if you have installed the Chrome extension, AFAIK.
(mentioned here for anyone else that wanders by this question and wonders what the heck you are talking about)
But what happens when doing the same on a xml file? Yay, 404! http://developer.android.com/reference/android/R.style.html
That is not an XML file. That is a Java class.
The fact that View Source resolves to a 404 may be a bug in the Chrome extension, or perhaps it was skipped because looking at R.java would be pointless, since all it has is a bunch of numeric constants. If it used to go someplace else before the kernel.org hack, then it's more likely to be a bug in the extension, but I never tried View Source on an R. class.
Where can I view those loved xml files online or download the current version?
The full Android open source tree is available for download.
There are a series of GitHub repos that mirror the AOSP projects, since GitWeb was never restored after the kernel.org hack. The repo that contains the Android SDK and related framework files is platform_frameworks_base.
On your hard drive, go to $SDK/platforms/$API/data/res/, where $SDK is wherever you installed the Android SDK and $API is a directory for an API level (e.g., android-11). This contains all sorts of resources, some of which are XML files.
Whether any of these are the ones you "loved" is impossible to answer, since we do not know which ones you loved.
I'm a newbie with Eclipse and Android. I have a legacy project from an
SVN repository which I could import and use under Eclipse Helios. Also
changes inside and outside Eclipse are synchronized fine with the SVN.
Now the problem: The project structure consists of a root directory,
referring to a src path, which exists outside the root (i.e. on the
same level as the root of the project is). I guess this has been
arranged by the designer, because the src part has been referenced
from different java projects for different platforms. I think this is
not such a bad idea.
However: Whatever I do I can't make Eclipse and SVN synchronize
changes on files located in this "outer" directory. What do I have to
do in order to make both aware of the outer parts, w/o being forced to
change the file/dir structure completely?
Kind regards
From what I understand from your description you did the following ?
You Removed the src folder created by eclipse during the first check out.
You create a linked src folder (when you created it, instead of just accepting all the defaults, you opened the "advanced" dialog box and checked the radio button saying Link...(Linked Folder) and you filled in the location where you wanted that "outer" src folder to be located).
You updated from the repository.
But when you look at the updated folders, the src that has been updated is really under the root rather than the one you have shifted away.
Can you confirm my understanding ?
If not, then you might try the procedure outlined above.
Unless there are twists in the ADT I don't know about (a little bit like in hierarchical maven projects where you can "export as Maven subproject"), I cannot see any other scenario that would lead to the problem you describe.