1
votes

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.

1
can you mark my answer as correct please?jzeferino

1 Answers

1
votes

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.