Comments (6)
@mt131 Could you add more details about it?
from coil.
it is an imageView in a recycleview
android:id="@+id/imageViewCover"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="8dp"
android:layout_marginTop="4dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="4dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.5"
override fun onBindViewHolder(holder: Song2Holder, position: Int) {
holder.imageViewCover.scaleType = ImageView.ScaleType.CENTER_CROP
holder.imageViewCover.load(producList[position].cover_image) {
transformations(RoundedCornersTransformation(32f))
}
}
from coil.
it is not work in 1 project but working in other project now
from coil.
It is not working fine for me either.
Some pictures are rounded but other ones not.
It is the same case, I am trying to load pictures into a recyclerView that has a GridLayoutManager
with three columns. The holder will take the size depending on the screen size, and it is always squared thanks to the constraint condition I add to the picture (app:layout_constraintDimensionRatio="H,1:1"
)
It is my ImageView xml:
<ImageView
android:id="@+id/file_image"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_margin="1dp"
android:scaleType="centerCrop"
android:adjustViewBounds="true"
app:layout_constraintDimensionRatio="H,1:1"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>
from coil.
The RoundedCornersTransformation does work, but what I found while testing is that the source Bitmap is rounded, not the ImageView itself (which is probably what you're expecting). So if the image ends up rounded, then scaled into the Imageview via centercrop (the ScaleType you specified), you'll lose those corners.
I was also expecting "RoundedCornersTransformation" to round the image post-scaling so you see those transformations in the view itself.
from coil.
@FrostRocket Yep, it's "technically" working, though definitely not the desired behaviour. Tracking the fix here.
from coil.
Related Issues (20)
- ByteArrayFetcher not saved on disk HOT 1
- java.lang.IllegalStateException: Reading a state that was created after the snapshot was taken or in a snapshot that has not yet been applied HOT 2
- add new decoder: coil3.svg.ResvgDecoder(use resvg to decode svg image) HOT 2
- 新增浏览器快捷操作
- Image is flickering in compose horizontal view HOT 2
- Update NetworkObserver to call connectivityManager.registerDefaultNetworkCallback instead of connectivityManager.registerNetworkCallback HOT 3
- Coil3 alpha-08 not compatible with ktor 3.0-beta02 HOT 2
- Turn off network cache, clear app file will not be able to load images HOT 1
- Investigate SieveCache as coil memory cache for better performance HOT 6
- Why does Coil always refresh when loading different images with the same URL by default? Is it a bug? HOT 1
- Support fonts on SVG files HOT 1
- ImageBitmap Support for multiplatform HOT 2
- coil-network-ktor3 version: 3.0.0-alpha09 causes Ktor HttpClient to crash HOT 2
- Green overlay on images with AVIF format HOT 6
- [wasmJS] Build Error. HOT 1
- [Coil-3] SVG flickering while scrolling HOT 2
- Coil 3: Differing APIs make writing multiplatform code fiddly HOT 3
- Coil disk cache doesn't work when loading an icon file manually HOT 1
- Coil with web view for caching image HOT 1
- [Coil 3] Frequent `ImageDecoder$DecodeException: Input was incomplete.` when displaying an Uri from the Android PhotoPicker in Compose Multiplatform. HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coil.