intellij-extra-icons-plugin icon indicating copy to clipboard operation
intellij-extra-icons-plugin copied to clipboard

Custom icons not shown in Android view (only appear in Project view)

Open amineharbaoui opened this issue 5 months ago • 5 comments

Environment

  • Android Studio: Android Studio Otter | 2025.2.1 | Build #AI-252.25557.131.2521.14344949, built on October 29, 2025
  • Extra Tools Pack: 2025.1.18
  • OS: macOS

Description

I’m using Extra Tools Pack (Extra Icons) in Android Studio and noticed that my custom directory icon rule works in Project view, but not in Android view.

I’m not sure if this is a known limitation of the Android view or if I might be missing a configuration step.

Steps to Reproduce

  1. Create a custom icon rule in Extra Icons → User icons

    • Type: Directory
    • Condition: Regex (.*/designsystem(/.*)?$)
    • Icon: Custom PNG
  2. Open the project containing a top-level module named designsystem

  3. Observe the results:

    • ✅ In Project view: custom icon is shown
    • 🚫 In Android view: default module icon remains

Expected Behavior

The custom icon should appear in both Project and Android views

Screenshots

amineharbaoui avatar Oct 31 '25 19:10 amineharbaoui

Hi, I confirm this limitation. I will see if I can make it work in the Android view.

jonathanlermitage avatar Oct 31 '25 20:10 jonathanlermitage

Unfortunately, this is a limitation of the Android view. Google has to allow icon modification for folders.
Submitted https://issuetracker.google.com/issues/456952097

jonathanlermitage avatar Nov 01 '25 21:11 jonathanlermitage

@amineharbaoui Ho wait, I think it may be a bit more complex.
I think you're referring to your "designsystem" directory? Is it a Gradle module?
Do you have a sample project? This would help me a lot. I haven't worked with Android since a very long time and I think I'm missing something. At least, what should I do to see this directory in the Android view?
Thx

jonathanlermitage avatar Nov 04 '25 15:11 jonathanlermitage

@jonathanlermitage Thanks for the follow-up 🙏

To help reproduce the issue, here are two projects you can use:

1. Minimal project (used in my initial report)

This is the simple project I used when opening the issue. It contains two Gradle modules

:app
:designsystem

designsystem is a standard Android library module declared in settings.gradle.kts:

include(":app")
include(":designsystem")

In Android Studio, when using the Android view, each Gradle module appears as a virtual node at the top level (it doesn’t directly map to a physical folder). That’s probably why the icon rule doesn’t apply, the plugin targets real directories, while the Android view shows these synthetic module entries

Link : https://github.com/haprojects/qr-craft

2. Official sample: Now in Android

To test on a larger multi-module setup, you can also try the official Google sample This project has a much more complex Gradle structure with nested modules as shown below

You should see the same behavior

Link : https://github.com/android/nowinandroid

That should help you confirm the limitation or test potential workarounds across multiple cases

amineharbaoui avatar Nov 04 '25 16:11 amineharbaoui

Thank you very much, this is very helpful.
Yeah, unfortunately, the benchmarks folder is not exposed as a file/folder node in the Android tree view. There is no API that allows me to change its icon. At least, not just for this single tree node.

There is a workaround, but there is a downside:

The benchmarks node uses the studio/icons/shell/filetree/android-test-root.svg icon. We can create a rule that modifies this icon (it applies after IDE restart):

Image

Problem: it will change this icon everywhere. If you go to the Project view, you can see that the benchmarks/src/main directories uses the same icon (both actually are marked as Android test sources, I don't know why).

Now, we can create a second rule to restore the right icon for the src/main directories:

Image

The icon:

Image

This works because, in Extra Icons, file/folder rules have a higher priority than "icon" rules.

Nota: if the icon is too small, go to Extra Icons settings, Advanced, then adjust the Additional UI Scale Factor, then Reload project icons:

Image

I found the icon by doing this:

  • enable the IDE internal mode: Help > Edit Custom Properties

  • add idea.is.internal=true

  • restart the IDE

  • ctrl+alt+click on the icon in the IDE. This will show the Click Info window: Image

  • click on the Icon property. This will show the full path of the icon. For me this is Icon path: jar:file:/home/jon/.local/share/JetBrains/Toolbox/apps/android-studio/plugins/android/lib/artwork.jar!/studio/icons/shell/filetree/android-test-root.svg, so I opened the artwork.jar file, then I extracted the android-test-root.svg file.

  • when you're done, don't forget to disable the internal mode, as is also activates additional IDE assertions which may produce some annoying error/warning reports


I will continue to investigate. JetBrains had the same problem with its Python and .NET views, and they fixed that after I reported these problems. I will see if I can provide a patch to Google for their Android view.

jonathanlermitage avatar Nov 04 '25 18:11 jonathanlermitage