Hello all, pleased to join the community after moving over from PalmOS
recently.

I thought this problem was funny till it kept me awake all night
trying to beat the ADC deadline...

I have an ImageView in a LinearLayout of my widget. I set the
ImageView drawable from an application icon like this:

Drawable d = packageManager.getActivityIcon( new ComponentName
( appPkg, appClass ) ) );

Bitmap b = Bitmap.createBitmap(
        draw.getIntrinsicHeight(), draw.getIntrinsicWidth(),
        Bitmap.Config.ARGB_8888
);
Canvas can = new Canvas( b );
draw.draw( can );

views.setImageViewBitmap( R.id.icon, b );

The widget appears fine after leaving the configure activity,
but after a couple of minutes of busying around the home screen,
the icon disappears (but the text underneath remains...).

If I set the ImageView to one of my own package resources like this:

views.setImageViewResource( R.id.icon, R.drawable.icon_test ...;

No problem.

Other info:
- no updates are being performed (I've checked)
- when I do make it update regularly, no effect anyway
- after a reboot the icon also doesn't show up

Got me pulling my hair out!

Any takers ?

TIA!

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to