Adding 9-patch resource android,
Crossbones+ - Reputation: 2442
Posted 25 August 2014 - 10:13 PM
Moderators - Reputation: 40186
Posted 25 August 2014 - 10:47 PM
You have a resource stored in your jar file. You also write you "need an identifier", which seems confusing. Normally you don't need an identifier, you need a stream for the resource.
The normal way of doing it is something like: InputStream is = getClass().getResourceAsStream("/res/caseSensitiveFileName.png");
That will allow you to stream whatever resource you need out of your file (recalling that jar files are nothing more than standard zip files which use a per-file stream-based encoding). Also remember that even if your system uses NTFS or FAT or another non-case-sensitive file system, the file table in zip is (and always has been) case sensitive.
Check out my book, Game Development with Unity, aimed at beginners who want to build fun games fast.
Also check out my personal website at bryanwagstaff.com, where I occasionally write about assorted stuff.