Comments (14)
any updates on chaining requests? would love to have it.
from coil.
I solved this problem use Gilde đ
from coil.
so long time never update, lose hope
from coil.
This enhancement would be great. For those who look for a basic workaround see below;
sampleImageView.load(imageUrl) {
target(
onSuccess = {
sampleImageView.load(imageUrl) {
crossfade(true)
transformations(RoundedCornersTransformation(30f))
}
},
onError = {
handleError(it)
}
)
}
I know, it looks ugly as hell đ€ź
from coil.
Hi, any update on this enhancement, or If anyone can help how we can transform the error placeholder.
from coil.
fun ImageView.loadImage(url: String?) {
load(url) {
transformations(RoundedCornersTransformation(context.getDp(R.dimen.radius_image))).placeholder(
R.drawable.profile_avatar_logo
).error(R.drawable.profile_avatar_logo)
}
}
fun ImageView.loadCircleImage(url: String?) {
load(url) {
transformations(CircleCropTransformation()).placeholder(R.drawable.profile_avatar_logo)
.error(R.drawable.profile_avatar_logo)
}
}
fun ImageView.loadImage(id: Int) {
load(id) {
transformations(RoundedCornersTransformation(context.getDp(R.dimen.radius_image))).placeholder(
R.drawable.profile_avatar_logo
).error(R.drawable.profile_avatar_logo)
}
}
fun ImageView.loadCircleImage(id: Int) {
load(id) {
transformations(CircleCropTransformation()).placeholder(R.drawable.profile_avatar_logo)
.error(R.drawable.profile_avatar_logo)
}
}
from coil.
I'm running into the same problem, trying to set a placeholder image that is circle cropped. I'm getting a square placeholder image then the circle cropped image that is loaded. Is this issue still not resolved?
[UPDATE] Learned that Glide may not support this as well. For a simple workaround, created circle cropped placeholder image which for my purposes is probably better.
from coil.
@colinrtwhite do you want this functionality?
from coil.
I'd like to add this eventually as part of supporting chaining requests (similar to this issue #27). I haven't settled on an API yet, though.
from coil.
Any updates?
from coil.
Hi, any update on this enhancement, or If anyone can help how we can transform the error placeholder.
from coil.
@colinrtwhite Is this enhancement planned? I really need it
from coil.
Seconding here that this I also really need this. I use rounded corners on my AppWidget images and using the RoundedCornersTransformation
with coil is the only feasible way I can send a rounded error drawable to the widget.
from coil.
Currently I think using oval shape is the best choice:
<shape android:shape="oval"
xmlns:android="http://schemas.android.com/apk/res/android">
<stroke android:width="1dp" android:color="#ffffffff" />
<solid android:color="#ff7be0dd" />
</shape>
fun ImageView.loadCircleImage(image: Any?) = load(image) {
crossfade(true)
transformations(CircleCropTransformation())
placeholder(R.drawable.round_7be0dd_stroke_white)
error(R.drawable.round_ff8bff_stroke_white)
}
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.