You can't do this; ids aren't an intrinsic property of resources like drawables; they simply provide an efficient way to reference application content that is static within the context of a given configuration. As such they can't be applied to resources generated at runtime. Tom.
2009/5/26 guruk <[email protected]> > > Hi Tom, hi Streets of Boston, > > I use this now and it works.. if there is a shorter way... always > welcome :) > > Bitmap ob = BitmapFactory.decodeResource > (resources,R.drawable.mydaysminipic_td); > Bitmap obm = > Bitmap.createBitmap(ob.getWidth(), ob.getHeight(), > ob.getConfig()); > Canvas canvas = new > Canvas(obm); > Paint paint = new Paint(); > paint.setColorFilter(new > PorterDuffColorFilter > (0xff00ffff,Mode.SRC_ATOP)); > canvas.drawBitmap(ob, 0f, > 0f, paint); > > updateViews.setImageViewBitmap(draws2[i + 10], obm); > > ---- > but bytheway: > > it looks you know something about that drawables and bitmaps :) > > setImageViewResource (int viewId, int srcId)) > does need a viewID and a srcID . both int > > i can create a new Drawable and assign my ColorFilter with: > Drawable dx = resources.getDrawable(R.drawable.mydaysminipic_ov); > dx.setColorFilter(0xff00ff00, Mode.SRC_ATOP); > > but is there any way to get a srcID for that new created Drawable (ex. > getidfrom())? > > If so I could just set: > > updateViews.setImageViewResource(draws2[i + 10], getIdfrom(dx)); > > to update my Widget :) > > Anyhow.. again.. thanks > > Chris > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

