Reflective Drawable Loader
Sample project demonstrating the use of the Reflective Drawable Loader Library
Alexandros Schillings · co.uk.alt236.reflectivedrawableloader.sampleapp
UpdatedJul 13, 2016
PublishedJul 13, 2016
Packageco.uk.alt236.reflectivedrawableloader.sampleapp
MD566aa5f584ae2b71f615e2910d01e1480
SHA1 (signer)1A:68:EE:08:0B:87:A7:45:94:B9:76:73:ED:74:EC:56:30:83:43:4F
Signed byCN=Alexandros Schillings, OU=Unknown, O=alt236, L=Colchester, ST=Essex, C=UK
Malware scanTRUSTED
Websitehttp://aschillings.co.uk/
Contact[email protected]
Privacy policyView
What's new
v0.0.1 First public release
v0.0.2 Bugfixes, added caching of the resource classes in ReflectionUtils.
v0.0.3 Added caching of non-existing drawable requests.
v0.0.2 Bugfixes, added caching of the resource classes in ReflectionUtils.
v0.0.3 Added caching of non-existing drawable requests.
Description
This is a sample project demonstrating the use of the Reflective Drawable Loader Library.
The library (and code) can be found here: https://github.com/alt236/Reflective-Drawable-Loader---Android
Project Description
---
Were you ever in a situation where you had to access Drawables based on their names (for example if the Drawable names are stored in a DB) and you had to write long lookup tables converting the names into R.drawable.ids? And maintaining them?
This library is offering a way around it by using reflection to access the Drawable directly by name. You only need to include them as normal into your Res folder tree. It has been benchmarked at up to 5x faster than the platform's Resources.getIdentifier() method.
It is using LRU caching to mitigate the reflection time overhead for both reflection "hits" and "misses".
The library (and code) can be found here: https://github.com/alt236/Reflective-Drawable-Loader---Android
Project Description
---
Were you ever in a situation where you had to access Drawables based on their names (for example if the Drawable names are stored in a DB) and you had to write long lookup tables converting the names into R.drawable.ids? And maintaining them?
This library is offering a way around it by using reflection to access the Drawable directly by name. You only need to include them as normal into your Res folder tree. It has been benchmarked at up to 5x faster than the platform's Resources.getIdentifier() method.
It is using LRU caching to mitigate the reflection time overhead for both reflection "hits" and "misses".
Required features
- Touchscreen android.hardware.touchscreen