3

In my android project, inside value folder I created a folder called appTheme and inside this folder I have a style called "AppTheme" inside a file called themes_apptheme.xml. But when I try to access it using @style/AppTheme it just not work:

No resource find that matches the give name '@style/AppTheme'.

But when I move this file to value folder, it works.

The question is: How to referentiate the file on appTheme folder?

richardaum
  • 6,651
  • 12
  • 48
  • 64

2 Answers2

1

I think you can't crease subFolder in res folder !

Maxouille
  • 2,729
  • 2
  • 19
  • 42
1

The android only uses one folder for each xml, now on your situation you are creating a folder inside the values folder which wont really work. @style will actually call the style name. calling the folder name next to it will not even call it but it is just an extra folder in the values folder with no use.

Have a look at here

What you can see in there are only valid xml and folder in android.

and states:

They contain things such as application source code and resource files.
Some are generated for you by default, while others should be created if required

The should be created if required means the folder or xml that it is not generated upon creating the project like anim folder for animation.

Rod_Algonquin
  • 26,074
  • 6
  • 52
  • 63