View background question

by WoodManEXP » Thu, 24 Sep 2009 09:58:17 GMT


Sponsored Links
 Does anyone know how to set a View background drawable that clips the
image rather than scaling it (sort of like using a ImageView with wrap-
content instead of fill_parent).

I like to set background drawable and not have it distorted (looks
especially bad when going to landscape orientation).

Is there a way to do this?

Alternatively, is there a way to set an ImageView as a View
background and overlay the other views on it?

Thank you!

--~--~---------~--~----~------------~-------~--~----~



View background question

by WoodManEXP » Thu, 24 Sep 2009 11:01:17 GMT


 I figured this out.

Use RelativeLayout and you can overlay views. This makes it possible
to use an ImageView to create a nonscaling backgroud.

Hope this helps someone out there!



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. Not able to set APN with 2G network, but works with 3G

When you have a 3G connection, can you check the APN setting and see if it
shows MCC and MNC?

When you create a new APN, does it auto-fill the MCC/MNC settings?

If you can collect a bug report right after the device connects on 3G it
might help understand what's happening.

Thanks
Robert








> > > website:

2. loadDataWithBaseURL stopped working on Nexus 1 2.2



Use adb logcat, DDMS, or the DDMS perspective in Eclipse to examine
the Java stack trace associated with the "force close".

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
Available!

-- 

3. how do i change an image at runtime?

4. Has anyone got a aPad?

5. I want to know which app is run?

6. TextView: Different font scaling if specified in XML or programmatically?

7. EnhancedGoogleSearch Settings activity ANR