Got issues with setting ContentPage.BackgroundImage property on android. (iOS works great).
Tryin to do it like so:
this.BackgroundImage = "/images/some/image/image.png";
But got the error:
What can be the issue?
@shtpavel can you show us a screen shot of the folder where you have the image.png file?
@MitchMilam Yep here it is:
@shtpavel what folder is the images folder in? It needs to be in the Resources/Drawable folder for Android. I've also had trouble using subfolders across devices. Can you try a test and put one of the images in the main Drawable folder to see if that fixes the issue?
If so, you may need to play with the path a bit. There also seems to be differences in forward vs. backward slashes. I never took the time to pin down all of caveats, but there are more than a few.
@MitchMilam Thanks, the solution is:
set the image as AndroidResource
Thanks a lot.
@shtpavel : works good!
Xamarin Inc., as a wholly-owned Microsoft subsidiary acting as a separate legal entity, adheres to the Microsoft Privacy Statement: Privacy & cookies