views:

32

answers:

1

Like the title. I have a small drawable file, but the ImageView is much larger than it. How I can fill it without left any extra space? Thanks in advance.

+1  A: 

If you are trying to "fill" the ImageView:

android:scaleType="fitXY"

If you are trying to "tile" look into BitmapDrawable and setTileModeXY()

iPaulPro
How about fill ImageView with the multi-same drawable files not change it's size
landry
Did you try BitmapDrawable, setTileMode? I have not done this personally but the description of a BitmapDrawable is "A Drawable that wraps a bitmap and can be tiled, stretched, or aligned."
iPaulPro
I just put the drawable in the background, It works for me. Thanks.
landry
So how did you get this to work exactly? You created a BitmapDrawable from the image and then simply set it as the background of the ImageView and it was tilled?
Kman