Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #3061
| From | Lew <lew@lewscanon.com> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Android: create drawable from path |
| Date | 2011-04-14 12:06 -0700 |
| Organization | http://groups.google.com |
| Message-ID | <908b85be-4c87-4bd6-b5f1-4b82ffeea13e@b13g2000prf.googlegroups.com> (permalink) |
| References | <90opnjFunsU1@mid.individual.net> |
On Apr 14, 1:37 pm, Dirk Bruere at NeoPax <dirk.bru...@gmail.com>
wrote:
> For some reason d=null when creating a drawable from coverArtURLStr,
> which is the full http path to the resource on the LAN.
>
Are you certain that value is what the method sees?
> Anything obvious wrong? It's a path to a .png
> [I can access the LAN OK, and Data.defaultCoverArt works fine]
>
> public static void updateCoverArt(String coverArtURLStr)
> {
> String coverArtURL = coverArtURLStr;
>
Why the extra 'String' assignment?
What is the *actual* value of 'coverArtURLStr' at this point when you
have the problem?
> Drawable d;
>
> if (coverArtURL.equals(""))
> d = Data.defaultCoverArt;
> else
> d = Drawable.createFromPath(coverArtURL);
>
The value of 'd' at this point when you have the problem is 'null',
you say.
> Data.coverArtIV.setImageDrawable(d);
> }
>
When you say "I can access the LAN OK", that may or may not bear on
whether your program can access the LAN when you're running your
test. There's insufficient information in your post for us to know.
Since you have not provided an SSCCE there's little likelihood we can
debug your problem. On the face of it the'createFromPath()' method is
unable to access the actual URL string you're giving it, a datum you
have omitted from your problem statement.
Provide an SSCCE, please.
--
Lew
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
Android: create drawable from path Dirk Bruere at NeoPax <dirk.bruere@gmail.com> - 2011-04-14 18:37 +0100
Re: Android: create drawable from path Lew <lew@lewscanon.com> - 2011-04-14 12:06 -0700
Re: Android: create drawable from path Dirk Bruere at NeoPax <dirk.bruere@gmail.com> - 2011-04-14 21:32 +0100
Re: Android: create drawable from path Lew <noone@lewscanon.com> - 2011-04-14 18:32 -0400
Re: Android: create drawable from path Dirk Bruere at NeoPax <dirk.bruere@gmail.com> - 2011-04-15 00:52 +0100
Re: Android: create drawable from path Patricia Shanahan <pats@acm.org> - 2011-04-14 17:28 -0700
Re: Android: create drawable from path Dirk Bruere at NeoPax <dirk.bruere@gmail.com> - 2011-04-15 02:20 +0100
Re: Android: create drawable from path Patricia Shanahan <pats@acm.org> - 2011-04-14 21:20 -0700
Re: Android: create drawable from path Dirk Bruere at NeoPax <dirk.bruere@gmail.com> - 2011-04-15 11:38 +0100
Re: Android: create drawable from path Patricia Shanahan <pats@acm.org> - 2011-04-15 09:25 -0700
Re: Android: create drawable from path Dirk Bruere at NeoPax <dirk.bruere@gmail.com> - 2011-05-04 18:29 +0100
Re: Android: create drawable from path markspace <-@.> - 2011-05-04 11:24 -0700
Re: Android: create drawable from path Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2011-05-04 20:27 +0200
Re: Android: create drawable from path Nigel Wade <nmw-news@ion.le.ac.uk> - 2011-05-05 09:39 +0100
Re: Android: create drawable from path Lew <noone@lewscanon.com> - 2011-04-15 07:27 -0400
csiph-web