Bug: cannot avoid center-crop
See original GitHub issuesuppose I have a small image to show inside the circularImageView, how do I avoid it being center-cropped? I’ve set this:
<com.mikhaellopez.circularimageview.CircularImageView
android:id="@+id/movingIconImageView"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_gravity="center_horizontal"
android:src="@drawable/test"
app:border="true"
app:border_color="#fff"
app:border_width="0px"
app:shadow="true"
app:shadow_color="#000"
app:shadow_radius="8"/>
and the image is of size 58x60 dp (it’s in the mdpi folder and has the same pixels size as the dp).
Yet this is what I see (ignore what’s behind ) :
Same thing occurs when I have a 100x100 dp of the view. It always does center-crop…
I’ve tried changing the scaleType, but it doesn’t do anything. I’ve even tried forcing padding, but it didn’t help.
Issue Analytics
- State:
- Created 8 years ago
- Comments:18 (6 by maintainers)
Top Results From Across the Web
Android studio XML centercrop doesn't center the image
I have added a background-image in Android Studio, I used center-crop to center it. The problem I have is that the image does...
Read more >Displaying Images with the Picasso Library
Note: there is a bug with the current version of Picasso that prevents large images ... Transform options include centerCrop() (Crops an image...
Read more >How to set a "CenterCrop" & "Round Corner" bitmap into a ...
Now the problem presents : The "CenterCrop" & "Rounded Corner" bitmap cannot be loaded at the "First Time"(which means the picture I have...
Read more >Allow Notification BigPicture to use all kind of image scale ...
Default scaling behavior of Notification BigPicture style is to center-crop any kind of image provided, making too dificult to adapt and use it...
Read more >center crop image based on other image dimension
The mapping toolbox stuff is not a problem, I only need help with cropping the same part from both images (RGB AND TIR)....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
How did you do it so fast?
Here’s a pretty elegant way
where 8dp is the padding