Sorry I can't address Market questions.

On Wed, Apr 20, 2011 at 1:23 PM, Leo <[email protected]> wrote:

> Hi Dianne,
>
> I have an app whose icon looks fine on my phone (Samsung Captivate)
> after app is installed but looks blurred when viewed in the android
> market search listing. Would that be explained because of incorrect
> icon size as well (48x48dp units)?
>
> Thanks,
> Leo
>
> On Apr 20, 9:22 am, Dianne Hackborn <[email protected]> wrote:
> > Some applications seem to be kind-of lame and not actually have app icons
> of
> > the right size.  You'll want to ensure the icons you get are the right
> size
> > by scaling them if they aren't actually the correct size.  Launcher and
> > other things do this.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > On Wed, Apr 20, 2011 at 4:49 AM, varinag gold <[email protected]>
> wrote:
> > > Hi Dianne,
> >
> > > Thanks for your reply.
> > > If I don't resize them some application icons appear larger than
> > > others and suppose the android should choose all resources according
> > > to the device lcd density (hdpi, mdpi or ldpi )?
> >
> > > Regards,
> > > varinag
> >
> > > On Apr 20, 12:09 pm, Dianne Hackborn <[email protected]> wrote:
> > > > The size of app icons is 48x48 dp units.  If you are drawing them at
> some
> > > > different size, they will be blurry because you are scaling them from
> > > their
> > > > designed size.
> >
> > > > On Tue, Apr 19, 2011 at 8:59 PM, varinag gold <[email protected]
> >
> > > wrote:
> >
> > > > > Hi,
> >
> > > > > I am displaying a grid of icons of all the applications on my
> device
> > > > > and I found after I resize them to be all same width and height
> they
> > > > > appear on screen some what blurred or foggy .  Also the Icon Text
> > > > > looks blurred . I have put code snippet below that actually
> resizing
> > > > > the icons.
> >
> > > > > Please let me know if I am missing some thing to make them appear
> > > > > sharp on screen.
> >
> > > > > Thanks a lot.
> > > > > varinag
> > > > > -------------------------------------------------
> >
> > > > >  if (!info.filtered) {
> >
> > > > >            int width = 42;
> > > > >            int height= 42;
> >
> > > > >            final int iconWidth = icon.getIntrinsicWidth();
> > > > >            final int iconHeight = icon.getIntrinsicHeight();
> >
> > > > >            if (icon instanceof PaintDrawable) {
> > > > >                PaintDrawable painter = (PaintDrawable) icon;
> > > > >                painter.setIntrinsicWidth(width);
> > > > >                painter.setIntrinsicHeight(height);
> > > > >            }
> >
> > > > >            if (width > 0 && height > 0 && (width < iconWidth ||
> > > > > height < iconHeight)) {
> > > > >                final float ratio = (float) iconWidth / iconHeight;
> >
> > > > >                if (iconWidth > iconHeight) {
> > > > >                    height = (int) (width / ratio);
> > > > >                } else if (iconHeight > iconWidth) {
> > > > >                    width = (int) (height * ratio);
> > > > >                }
> >
> > > > >                final Bitmap.Config c =
> > > > >                        icon.getOpacity() != PixelFormat.OPAQUE ?
> > > > >                            Bitmap.Config.ARGB_8888 :
> > > > > Bitmap.Config.RGB_565;
> > > > >             //   final Bitmap thumb = Bitmap.createBitmap(80, 80,
> c);
> > > > >                final Bitmap thumb = Bitmap.createBitmap(42, 42, c);
> > > > >                final Canvas canvas = new Canvas(thumb);
> > > > >                canvas.setDrawFilter(new
> > > > > PaintFlagsDrawFilter(Paint.DITHER_FLAG, 0));
> > > > >                // Copy the old bounds to restore them later
> > > > >                // If we were to do oldBounds = icon.getBounds(),
> > > > >                // the call to setBounds() that follows would
> > > > >                // change the same instance and we would lose the
> > > > >                // old bounds
> > > > >                mOldBounds.set(icon.getBounds());
> > > > >               // icon.setBounds(0, 0, 80, 80);
> > > > >                icon.setBounds(0, 0, width, height);
> > > > >                icon.draw(canvas);
> > > > >                icon.setBounds(mOldBounds);
> > > > >                icon = info.icon = new BitmapDrawable(thumb);
> > > > >                info.filtered = true;
> > > > >            }
> > > > >        }
> >
> > > > >        final TextView textView = (TextView)
> > > > > convertView.findViewById(R.id.label);
> > > > >        textView.setCompoundDrawablesWithIntrinsicBounds(null, icon,
> > > > > null, null);
> > > > >        textView.setText(info.title);
> >
> > > > >        return convertView;
> > > > >    }
> >
> > > > > --
> > > > > 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
> >
> > > > --
> > > > Dianne Hackborn
> > > > Android framework engineer
> > > > [email protected]
> >
> > > > Note: please don't send private questions to me, as I don't have time
> to
> > > > provide private support, and so won't reply to such e-mails.  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
> >
> > --
> > Dianne Hackborn
> > Android framework engineer
> > [email protected]
> >
> > Note: please don't send private questions to me, as I don't have time to
> > provide private support, and so won't reply to such e-mails.  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
>



-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  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

Reply via email to