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

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

问题描述

在新的 Android Studio 3.3 上,一些图标发生了变化,我想了解每个图标的含义.

解决方案

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

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


还有一个带咖啡杯的:

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


还有一些蓝色的文件夹.这些笔记来源根源.在项目视图中,您通常会找到 java,如果您像这样将其分开,也可以使用其他语言:

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


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


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

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


我们也有普通文件夹:

而这些只是文件夹.它们可能包含资产或资源,但不被认为是特殊的.它们也没有链接到 IDE 中的任何内容,但它们可能仍然具有相关性,具体取决于您的构建系统.它并不总是喜欢这样的东西.


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


这个应该很熟悉:

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


说到资源和资产,这将我们带到下一个图标:

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


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

这是除了有绿色背景


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

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

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

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


这些是我能找到的所有独特的文件夹图标.我希望我没有遗漏任何东西.

特别说明

如果您使用Material Theme 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天全站免登陆