The system scrollbar does not have a track anymore. Your code should simply account for that possibility. The framework code does attempt to load a scrollbar track but does not crash if no resource is present.
On Wed, May 13, 2009 at 10:36 PM, Peter Carpenter <[email protected]> wrote: > > > Hi all, > > I've just been attempting to upgrade my application to support 1.5 and > discovered that I can no longer retrieve a resource for my scrollbar > background. > > My app requires me to draw a scrollbar that I can use to control a > custom component. > > Currently I was using the following code (which Jeff was kind enough to > point me in the right direction of): > > TypedValue val = new TypedValue(); > if (context.getTheme().resolveAttribute( > android.R.attr.scrollbarThumbVertical, val, true)) > { > scrollThumb = getResources().getDrawable(val.resourceId); > } > if (context.getTheme().resolveAttribute( > android.R.attr.scrollbarTrackVertical, val, true)) > { > scrollTrack = getResources().getDrawable(val.resourceId); > } > > However the 2nd getDrawable causes a ResourceNotFound exception so it > appears the scrollbarTrackVertical has been removed?? > > Does anyone know of any other ways to get the system scrollbar > drawables? (or a system scrollbar by itself?) > > Regards, > > Peter. > > > > -- Romain Guy Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

