Yep I played with the xml attributes (such as scaleType)...but none would change the density being used. Or did I miss that?
On Mon, Feb 20, 2012 at 7:36 AM, Dusk Jockeys Android Apps < [email protected]> wrote: > Could you not play with the xml settings of the ImageView itself? I > think there are some attributes there that control how the image is > displayed, whether or not it is scaled, centred etc. > > On Feb 18, 4:56 am, YuviDroid <[email protected]> wrote: > > Hi, > > > > sorry to resurrect this post...but I got into a similar problem. And as > the > > OP did, I'm using RemoteViews.setImageViewUri() to set my image on the > > appwidget. However I noticed that my image is being scaled according to > the > > screen density. > > > > So, for example, on an XHDPI screen, if I have a bitmap which is 100x100 > > and I set it using setImageViewBitmap() I get the image to look as > 100x100. > > However, if I store that bitmap into a png on disk, and then use > > setImageViewUri() my bitmap is displayed as 50x50. > > > > Do you know if there is a way to change this behavior? (i.e. if my image > is > > 100x100 I'd like it to remain 100x100 also after it is decoded). > > Maybe there is a way to force some density on the ImageView itself? > > > > My only workaround (which sucks..) is to scale-up the bitmap before > storing > > on disk so that when it is being decoded I get back my original size. But > > in this way I use more memory to save the image and I also loose image > > quality..:( > > > > I hope someone can help me! > > Thanks, > > Yuvi > > > > On Mon, Aug 1, 2011 at 8:05 PM, Ash McConnell <[email protected] > >wrote: > > > > > > > > > > > > > Thanks Kostya and Dianne, setUri works as expected. I had to create > the > > > files using context.openFileOutput. Unfortunately that means I loose > the > > > ability to use directories. I can't see a "Java" way to set > permission on > > > files, it can be done with native methods, but that seems like > overkill. > > > I'll do some more googling. > > > > > Thanks again for the help, I was worried that this problem might have > been > > > a show-stopper. > > > Ash > > > > > -- > > > 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 > > > > -- > > YuviDroid > > Check out Launch-X <http://android.yuvalsharon.net/launchx.php> (a > widget > > to quickly access your favorite apps and contacts!) > http://android.yuvalsharon.net- Hide quoted text - > > > > - Show quoted text - > > -- > 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 > -- YuviDroid Check out Launch-X <http://android.yuvalsharon.net/launchx.php> (a widget to quickly access your favorite apps and contacts!) http://android.yuvalsharon.net -- 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

