Scale a background image or drawable?

by Sam » Thu, 10 Sep 2009 00:47:40 GMT


Sponsored Links
 Hi,

On a layout I want to scale the background image (keeping it's aspect
ratio) to the space allocated when the page gets created. Anyone have
any idea how to do this?

I am using layout.setBackgroundDrawable() and am using a
BitmapDrawable to setGravity for clipping and filling, but don't see
any option for scaling.

Sam
--~--~---------~--~----~------------~-------~--~----~



Scale a background image or drawable?

by Sam » Fri, 25 Sep 2009 10:37:45 GMT


 Thanks! It worked great with some tweaking for what I needed.





> Drawable:


Sponsored Links


Scale a background image or drawable?

by Sam » Fri, 25 Sep 2009 10:38:01 GMT


 Thanks! It worked great for what I needed to do.





> Drawable:



Other Threads

1. Videos

HI i am new to android and i am looking for some video tutorials , so
if any of you'll know where i can find please let me know.
Thanks

-- 

2. unable to connect to the repository

hi i have downloaded eclipse from eclipse if i tried to install adt
pluggin it is saying unable to connect to repository please help me

-- 

3. Camera Preview problems

4. Wifi connect and no internet error

5. Keyguard Issue

6. Null canvas being passed to onDraw(Canvas canvas)

7. ADT 9.0.0 preview