for example: I am having a imageView width fixed of 600dp and height has to be calculated based on the given image height and fixed width(600dp). it should be in such a way that it matches the width not much big not small.
Asked
Active
Viewed 202 times
0
-
first you must get image width and height. then calculate ratio and apply the ratio into your fixed dimension – behrooz Nov 05 '15 at 08:27
-
1http://stackoverflow.com/questions/8880376/how-to-get-height-and-width-of-a-image-used-in-android Using this links you can find image height and width. – Chirag Savsani Nov 05 '15 at 08:28