dileep
dileep

Reputation: 347

I would like to fit the image in the image view with out having the blank spaces

I have given the image view of certain size the image which i have smaller size than the image view when i fit the image view it is looking like the picture is at the corner but i would like to get the picture in certain pattern such as after filling the smaller image in the image view on the corner the remaining space of the image view should be filled with the same smaller pic until it fits the size of the image view. enter image description here

Upvotes: 1

Views: 81

Answers (3)

VikramV
VikramV

Reputation: 1111

In your layout file where the ImageView component is you can add this attribute

android:scaleType="fitXY"

Upvotes: 0

Murali Ganesan
Murali Ganesan

Reputation: 2955

Try this, Add scaleType attribute in your xml file

android:scaleType="fitXY"

Upvotes: 0

Pratik Dasa
Pratik Dasa

Reputation: 7449

Use android:scaleType="fitXY" and android:adjustViewBounds="true". This will work in your case.

Upvotes: 2

Related Questions