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. setRequestedOrientation call flow

Hi, what's the actual call (function) flow from setRequestedOrientation
(java) down to SurfaceFlinger(cpp)?
Specially, can someone explain where the parameter 0 of
setRequestedOrientation get translated into ROTATION_90?

Max

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

2. Portrait/Landscape mode supporting

Hello folks,

When we try to implement orientation in AP layer,
we can set "android:screenOrientation" parameter in
AndroidManifest.xml file or call "setRequestOrientation()" method of
Activity class.

But if I want to porting android in new HW device,
how can I do? Do I need to modify the graphic driver, or just add
configuration in program. (Actually I do some experiments but my AP
cannot rotate)

Besides, can every experts tell me when I set the
"android:screenOrientation" parameter, which process will read this
configuration, pass to where and which process will do the rotation?

Please give me some tips how to trace this flow.

Thanks everybody.
UJ

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

3. GL View layered on top of a SurfaceView?

4. ProgressDialog and sub activities

5. Input Method App

6. Improve scrolling speed

7. Sound interfering with Accelerometer and Orientation sensors?