Monday, April 30, 2012

Re: [android-developers] Fitting image to a screen

One point here: the assumption I'm making is that this is for a
wallpaper.

On Mon, Apr 30, 2012 at 03:46:37PM -0600, Justin Anderson wrote:
> >
> > And if you're about to question that, I got this directly from Dianne
> > Hackborn in a thread I
> > started over a year ago (maybe two...I'm not even sure now).
> >
> Do you happen to have a link to said thread?

If I did, don't you think I'd be able to say how long ago it was? ;-}
But given the source of the information---direct from one of THE
Android developers (as in, the platform itself), I think it's safe to
say that you're nuts if you don't listen to what she said.

> I have done image scaling before and have never run into this... My
> constraints were slightly different though... I simply scaled the image
> so that it was as large as possible while maintaining the aspect
> ration.

Yeah, and I tried all of that stuff, too....and no matter what, it kept
getting stretched off-screen when you set it as wallpaper.

> On Mon, Apr 30, 2012 at 3:26 PM, Mohamed ElSanousi <mmurtada57@gmail.com>wrote:
> >
> > Your joking, my whole project is depending. I need to resize this bitmap
> > to fit the screen size, because I want to do calculation on the picture :(

Wait a second...is this for a wallpaper (or lwp)? Or are you just trying
to set an ImageView to full screen? If the former, no, you can't do it.
If the latter, RTFM (http://developer.android.com/guide/index.html).
That's so simple I never even considered that that's what you were
asking. And you don't need to calculate the screen size or anything to
do that. Just the right settings (in XML and maybe also in Java) for an
ImageView.

Later,
--jim

--
THE SCORE: ME: 2 CANCER: 0
73 DE N5IAL (/4) | "> There it was, right in the title bar:
spooky130u@gmail.com | > Microsoft Operations POS."
< Running FreeBSD 7.0 > |
ICBM / Hurricane: | "Never before has a TLA been so appropriately
30.44406N 86.59909W | mis-parsed." (alt.sysadmin.recovery)

Android Apps Listing at http://www.jstrack.org/barcodes.html

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate