Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images not loading after started using compose 1.0.0-alpha08 #9

Closed
miduch opened this issue Dec 8, 2020 · 5 comments
Closed

Images not loading after started using compose 1.0.0-alpha08 #9

miduch opened this issue Dec 8, 2020 · 5 comments

Comments

@miduch
Copy link

miduch commented Dec 8, 2020

  • Library Version: v1.1.1
  • Pixel 4, Emulator

Images not loading anymore after started to use compose 1.0.0-alpha08, i have a CircularProgressIndicator set for loading {}
only that one is shown. No actual is loaded from provided url

Expected Behavior:

Images can be loaded

@skydoves
Copy link
Owner

skydoves commented Dec 8, 2020

Hi, @miduch
I just build the demo project, but It works fine to me.
Could you test using the demo project?

@skydoves
Copy link
Owner

skydoves commented Dec 8, 2020

I used this code:

@Composable
fun NetworkImage(
  url: String,
  modifier: Modifier,
  circularRevealedEnabled: Boolean = false,
  contentScale: ContentScale = ContentScale.Crop
) {
  CoilImage(
    imageModel = url,
    modifier = modifier,
    contentScale = contentScale,
    circularRevealedEnabled = circularRevealedEnabled,
    circularRevealedDuration = 450,
    loading = {
      ConstraintLayout(
        modifier = Modifier.fillMaxSize()
      ) {
        val indicator = createRef()
        CircularProgressIndicator(
          modifier = Modifier.constrainAs(indicator) {
            top.linkTo(parent.top)
            bottom.linkTo(parent.bottom)
            start.linkTo(parent.start)
            end.linkTo(parent.end)
          }
        )
      }
    },
    failure = {
      Text(
        text = "image request failed.",
        style = MaterialTheme.typography.body2
      )
    }
  )
}

@miduch
Copy link
Author

miduch commented Dec 8, 2020

CoilImage otherwise seems to be working fine in test @composable but in my actual use case it just doesn't get updated with fetched images and those spinners keep animating. urls are fine i checked

@miduch miduch closed this as completed Dec 8, 2020
@skydoves
Copy link
Owner

skydoves commented Dec 8, 2020

Could you give me some examples? I will check the problem.

@miduch
Copy link
Author

miduch commented Dec 9, 2020

sorry for delay, actually it started to work correctly after i reinstalled app -> closed issue after that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants