Home > Back-end >  How to Resize background image to match the Layout?
How to Resize background image to match the Layout?

Time:05-27

I have a question, how do you resize a background image in android studio to match the whole layout for example: I have a drawable that is landscape by default, but my layout is horizontal, I want to decrease the width and increase the height of thag photo to match thr layout, how do I do that??

CodePudding user response:

You need to scale your image, add this property and change the fitCenter by the one that corresponds to your criteria android:scaleType="fitCenter".

CodePudding user response:

Hope this helps. I think you have to add :

android:scaleType="fitXY"
android:adjustViewBounds="true"

But still, check out the link I attached, so you can have a better understanding.

  • Related