A
A
Andrey Pogorelov2014-08-18 21:18:17
Java
Andrey Pogorelov, 2014-08-18 21:18:17

ImageView Width = Height?

Actually the question is in the title. How to make an ImageView's width equal to its height, while leaving part of the image outside of the viewport on the screen. in LayoutParams I set the same values, but only the maximum screen width is set

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
Oleg Gamega, 2014-08-18
@gadfi

play around with ScaleType ─ how the image is drawn depends on this parameter

M
mobimaks, 2014-08-19
@mobimaks

See illustrative examples of different ScaleType.
I think fitCenter or fitXY will suit you .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question