I am trying to support two Icon_Picker intents:
org.adw.launcher.icons.ACTION_PICK_ICON
and
com.betterandroid.launcher2.icons.PICK_ICON_ACTION
Unfortunately ADW, Go Launcher and LauncherPro look for drawables in the /drawable either using the intent mentioned above, or by using an XML which looks in /drawable
Whereas the old BetterAndroid intent scans for images in the /assets folder. Now, I know of the great trick for drawables in order to supply a drawable from an XML:
<?xml version="1.0" encoding="UTF-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/com_aac_cachemate_demo_cachemate" />
</selector>
Therefore instead of supplying a graphic, I point to an existing graphic - Good for not needing duplicate files when referencing the same image, but with different names/ids.
My Questions:
1) Is there any equivalent trick that would work when referencing the /assets instead of drawable?
2) If I were to use AssetManager to read the assets and make them drawables:
a) Would they be readable by the Intent scanning for those drawables?
b) Would the app size inevitably double in size anyway?
c) How would I implement AssetManager correctly for this to work? Something like:
sampleimage= BitmapFactory.decodeResource(context.getResources(), R.drawable.sampleimage);
maybe? Or would there be better options to getAsset() from an Array maybe?
What I'm trying to achieve is not only have the images in /drawable but also somehow linked to /assets so that both intents can scan and find the drawables and display in their gridview without having to duplicate the graphics (putting them in b