I had the code in my start up (splash) activity, so yes it was in the
proper (as far as I know of) Context.
Yes, I did try to use the Resources.getSystem() verbatim. What
normal Resources object are you referring to? In other words, if you
cannot do:
mResources = Resources.getSystem();
Then
On Sunday, December 19, 2010 10:19:57 PM UTC, darrinps wrote:
Yes, I did try to use the Resources.getSystem() verbatim. What
normal Resources object are you referring to? In other words, if you
cannot do:
mResources = Resources.getSystem();
Then what would be to the right of:
You can use Java reflection with your application's R.drawable class to
build the list.
--
Kostya Vasilyev -- http://kmansoft.wordpress.com
18.12.2010 8:30 пользователь darrinps darri...@gmail.com написал:
What I am wanting to do is offer the user a list of image names and
allow them to choose
startPreloading() is not relevant to this; that is for the code there that
is preloading the drawables it gets from the array.
Is there actually a sym_def_app_icon drawable in your app? If not... well
yeah, that won't work, it doesn't exist.
You should just use the syntax I showed to make an
This was just an example that fit the example you provided. I trimmed
down the array to only one .png file which I verified time and again
was under the drawable directory and reworked the layout of the file
to match the example. The entire arrays.xml file which is found under
the values
I don't know what to say, the code I pointed to is exactly what has been in
the platform fairly unchanged since 1.0 and has worked fine.
Are you sure you are doing this on a Context that is actually for your
application? The error message (Invalid package identifier) indicates it
doesn't know
Thanks. I tried doing that but it seems to be an old API so I tried
to convert it to what is there today. There must be some mistake I
have made that keeps this from working.
Note that it didn't like mResources.startPreloading(); The method
simply was not there, although finishPreloading() is.
What I am wanting to do is offer the user a list of image names and
allow them to choose one then display that image in another activity.
On Dec 17, 10:42 pm, darrinps darri...@gmail.com wrote:
Thanks. I tried doing that but it seems to be an old API so I tried
to convert it to what is
You can read your images from the assets directory. It's not the same
as the res/drawable but you should still be able to read and use a
Drawable (image) from assets.
I'm not sure if you can scan assets though to look for new files (I
could very well be wrong about that, as I haven't tried).
Well, it's not what you asked for (since drawables come from different
directories) but it may be closer to what you are looking for.
You can use Java reflection to find all the public fields in
R.drawable.
The drawable directory doesn't exist at runtime; the contents are
packaged up into the
10 matches
Mail list logo