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. Can Andriod be used to built an database application?

I am looking forward to built an application using Android which read
information from some webpages and represent the same information in
an organized manner, a nice n tidy readable application. Is it
possible ?

Kind Regards

Rabia

--

2. Make SectionIndexer pick up new dataset

Hello,

I have an extended BaseAdapter that implements SectionIndexer. I build
my own index data whenever the dataset changes.

It works fine, but when the data set changes, the grid keeps using the
same SectionIndexer data even after a manual update of the section
data in my adapter and an adapter.notifyDataSetChanged(), and even if
I make a new adapter and call grid.setAdapter( newAdapter ).

Anyone know how I can make the grid pick up the new section data ?

If I call use:

grid.setFastScrollEnabled( false );
adapter.notifyDataSetChanged();
grid.setFastScrollEnabled( true );

it works, but then, when I use the thumb control, the index position
appears almost invisible in the top left corner of the grid!

Thanks for any suggestion to fix either of these,

Lee

-- 

3. Eclipse Debug only my Classes

4. Exception in com.google.android.location.ConfirmAlertActivity

5. Camera - Icon image resource for 'take picture' button?

6. Adding button to ListView

7. Android Parser