Android Studio 3.3文件夹图标 [英] Android Studio 3.3 folder icons

查看:76
本文介绍了Android Studio 3.3文件夹图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在新的Android Studio 3.3上,某些图标已更改,我希望了解每个按钮的含义.

解决方案

树有两个组成部分:背景颜色/文件夹颜色和其他图标.除此之外,还有文本颜色,但是它主要用于VCS,超出了问题的范围.有关VCS颜色的含义,请参见

这意味着它是一个Android模块.


还有一个带咖啡杯的人:

这可以表示Java模块,也可以表示Android项目的根(因为在这方面,Android项目也被视为Java项目).


还有一些蓝色的文件夹.这些注释源词根.在项目视图中,通常会找到 java ,如果这样将其分开,则可以找到其他语言:

在Android视图中,清单文件夹被视为源根.


测试根目录具有绿色文件夹(+绿色背景):


条形图文件夹是一个Android 模块(请注意,这与常规的Android模块不同):

此模块与常规Android模块之间的主要区别在于,与您常规的 com.android.application 相比,它应用了Gradle插件 com.android.library 在常规的Android模块中找到.


我们还有普通文件夹:

这些只是文件夹.它们可能包含资产或资源,但没有什么特别的.它们也没有链接到IDE中的任何内容,但是它们可能仍然具有相关性,具体取决于您的构建系统.它并不总是会接like而至.


生成的来源也有一个单独的图标,在右下角带有一个齿轮状的图标:


这应该很熟悉:

这是包装的图标.请注意,它不仅用于源集中,还用于资源和资产下.


谈到资源和资产,使我们进入下一个图标:

这可用于任何资源根目录,尽管Android在编译和加载过程中会以不同的方式对待它们.


在该主题上,测试资源也有其自己的图标:

这除了具有绿色背景


橙色文件夹(使用接近标准的主题,颜色也会不同.如果使用的是非标准主题,请参考配色方案以获取更多信息)显示排除的文件夹.

根据项目结构,您可以选择要排除的文件夹.默认情况下,.gradle被排除在外,如此处所示:

但是您也可以选择要排除的其他文件夹.此

这实际上不是文件夹-这是一个文件,包含由IntelliJ生成的模块的各种配置.但是,由于某种原因,它有一个文件夹图标(至少对我而言).虽然这不是文件夹,但我添加了它以避免混淆.虽然看起来像Android模块,但事实并非如此.


这些都是我可以找到的所有唯一文件夹图标.我希望我没有遗漏任何东西.

特别注意事项

如果您使用诸如材料主题UI 之类的插件,则您可能有不同的图标.诸如该捆绑自定义图标之类的某些插件,对于特定的用户而言,此答案不正确.在示例中,所有图标(链接:文件夹图标)带有名称.

此外,可以在此处找到一些股票IntelliJ图标带有名称(如果您有疑问的话). modules 文件夹似乎也包含一些文件夹图标.虽然我无法为Android特定的图标查明来源,但其中涵盖了其中的一些内容.

On the new Android Studio 3.3 some icons have change and I'm looking to understand what each one of the mean.

This and this answers are outdated.

For example in this picture I have two modules inside my project, but one have a green dot and the other this bar chart. What it means?

解决方案

There's two components to the tree: The background color/folder color, and additional icons. Beyond this, there's also the text color, but it's mainly used for VCS and is beyond the scope of the question. See this answer for VCS color meanings.

Because you're asking about folders in general in one part, icons in another, then two specifically in the last, I'm going to cover the various folder-based ones.

To start off, the exact colors depends on the color scheme, and in some cases plugins (there are a few plugins, for an instance the Material plugin, that entirely re-do the folders) that change these, but I'll be using a non-standard theme with the standard icons (TL;DR: different colors, same icons).

Important factors

Before I get started on the list itself, there are a few different factors that determine the icon:

  • Folder status (included/ignored)
  • Folder type
    • Module type (i.e. android, java library, etc)
    • General type (i.e. assets, resources, package, etc)
  • Source set (sources and tests) or hierarchical parent (I.e. test resources have a different icon from non-test resources)

In addition, there's file type, but those are out of the scope. Additionally, for the folder icons to be visible, the project needs to be successfully compiled. Failed compiling may result in AS/IntelliJ interpreting the folders differently, or even unregister source sets.

Additionally, it's worth noting that failed builds or re-building can, in some cases, change the folder icon to an incorrect (although related) one. In a recent module build on the test project, that the library module was unregistered, and the Android module was marked a Java module. This doesn't break anything though, but it's a good idea remembering this isn't always accurate.

The list

First off, we have the green dot:

This means it's an Android module.


There's also one with a coffee cup:

This can denote either a Java module, or the root for an Android project (because in that regard, the Android projects are considered Java projects too).


There's also some folders with the color blue. These note source roots. In the project view, you typically find java, alternatively with other languages if you separate it like that:

In the Android view, the manifest folder is considered a source root.


Test roots have green folders (+ a green background):


The bar chart folder is an Android library module (note that this isn't the same as a regular Android module):

The main difference between this and a regular Android module is that it applies the Gradle plugin com.android.library, compared to the regular com.android.application you find in the regular Android modules.


We also have plain folders:

And these are just folders. They may contain assets or resources, but aren't considered anything special. They're also not linked to anything in the IDE, but they may still have relevance depending on your build system. It doesn't always pick up on stuff like that.


Generated sources have a separate icon too, with a gear-like icon in the bottom right corner:


This one should be familiar:

This is the icon for a package. Note that it's not only used in source sets, it's also used under resources and assets.


Speaking of resources and assets, that brings us to the next icon:

This is used for any resource root, although Android treats these differently during compilation and loading.


And while on that topic, test resources have their own icon as well:

This is in addition to having a green background


Orange folders (using a near standard theme, and again, the colors vary. Refer your color scheme for more info if you're using a non-standard theme) show excluded folders.

This is as per project structure, an you can chose folders to exclude. .gradle is excluded by default, as can be seen here:

But you can also chose other folders to exclude. This excludes it from indexing


And (in theory) last: The fake folder.

This isn't actually a folder - this is a file containing various config for the module, generated by IntelliJ. Yet, for some reason, it has a folder icon (at least for me). While this isn't a folder, I've added this to avoid confusion. While it looks like an Android module, it isn't.


These are all the unique folder icons I can find. I hope I haven't left any out.

Special note

If you use a plugin such as Material Theme UI, you might have different icons. Some plugins like that bundle custom icons, which makes this answer incorrect for those specifically. With the example one, all the icons (link: folder icons) are available with names.

Additionally, some of the stock IntelliJ icons can be found here with names, if you're ever in doubt. The modules folder appears to contain some of the folder icons as well. I haven't been able to pinpoint the sources for the Android-specific icons though, but that covers some of them.

这篇关于Android Studio 3.3文件夹图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆