[android-developers] Re: getDrawable() Resourses$NotFoundException

2012-08-27 Thread 鄭育昇
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

Re: [android-developers] Re: getDrawable() Resourses$NotFoundException

2010-01-14 Thread TreKing
You can use mapView.getContext().getResources().getDrawable(...) in any function that hands you the mapview you're working with. - TreKing - Chicago transit tracking app for Android-powered devices

[android-developers] Re: getDrawable() Resourses$NotFoundException

2010-01-13 Thread Lance Nanek
I don't see any field named target in android.R.drawable. Are you sure there is a system drawable resource with that name? If you are using your own package's R class, then you should be using your activity's resources. They are available via getResources() on the activity. Resources.getSystem()

[android-developers] Re: getDrawable() Resourses$NotFoundException

2010-01-13 Thread Eric Crump
OK. I'm not in an Activity though, I'm in the overlay class. You can't call getResources() from there. Also, I printed the resource id to the log to verify that there is an actual value there. It matches the one in the R file. On Jan 13, 9:47 pm, Lance Nanek lna...@gmail.com wrote: I don't

[android-developers] Re: getDrawable() Resourses$NotFoundException

2010-01-13 Thread Lance Nanek
Let's say the package name for your app is com.example. You are using a value from the com.example.R class. The only values that will work with the system resources are from the android.R class. These values are not the actual content. They are just a value used to lookup the actual content. Have

[android-developers] Re: getDrawable() Resourses$NotFoundException

2010-01-13 Thread Eric Crump
Passing it in in the constuctor will work for having an addition Drawable, but what if I want to determine the one to pick at runtime and there are many to choose from? On Jan 13, 11:11 pm, Lance Nanek lna...@gmail.com wrote: Let's say the package name for your app is com.example. You are using