1

I am developing a splash screen on Android using Xamarin. I have a picture called "splash1.jpg" placed in my various drawable subfolders which contains the subfolder "splash". Thus, for example, I have a "resources/drawable-hdpi/splash/splash1.jpg" and a "resources/drawable-mdpi/splash/splash1.jpg".

In my layout for main.axml I have a line for the imageview source

android:src="@drawable/splash/splash1"

And the following line is autogenerated in my resources.cs file

public const int splash/splash1 = 2130837505;

There is an error with the slash in splash/slash1 const name which causes multiple errors on compilation.

How should I refer to my file in drawables when it is in a subdirectory in the drawable folders?

Thanks.

Flameater
  • 23
  • 3

1 Answers1

1

Android don't support subfolders inside /drawable folders. Please remove your /splash folder and place the splash images inside /drawable folder directly.

get more information here.

jzeferino
  • 7,700
  • 1
  • 39
  • 59
  • 1
    That's nailed it down. Jzeferino. I read somewhere on the Internet that you can organize your resources in drawables subfolders, must be one of those things you can't believe all you read on the Internet. Thanks for your answer anyway. Appreciate it. – Flameater Jun 28 '17 at 08:53