so i have a profile activity with a profile image. Now the image that was taken vertically. And I have horizontal image views. When i grab images onActivityResult() how do i "square" the image. By square the image, I mean, I want each image's width to be the width of the screen (and since its a square, height = image width = screen width).
In onActivityResult() i get the image from my gallery and camera back as a string path (which i can convert to a bitmap). Additionally, when i get images i get them from my backend using the Glide library and a url.
Glide.with(context).load("www.mybackendToImagePath").centerCrop().into(newImageView);
So, I need to convert that image path into a bitmap and then somehow square that bitmap with my screen's width. I'm not sure what code allows me to:
- get the dimensions of the device.
- transform's the image's width and height, to the width of the device.
Hope you guys can help!
Heres what my profile activity looks like.