you should get the resource of your project.
so, instead of using Resource.getSystem(), please use
getResource().getDrawable(id) of context class.
then , all right dow
Eric Crump於 2010年1月14日星期四UTC+8上午9時59分30秒寫道:
>
> I'm trying to set a resourse in the onTable method of my map overlay.
> It throws a Resourses$NotFoundException. I've also tried making it a
> class variable and setting it from the MapView but I get the same
> result.
>
> @Override
> public boolean onTap(GeoPoint gp, MapView mv)
> {
> OverlayItem item = new OverlayItem(gp, "", "");
> Drawable drawable = Resources.getSystem().getDrawable
> (R.drawable.target);
> item.setMarker(altDrawable);
> addOverlay(item);
> return true;
> }
>
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en