question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MvxImageLoadingView auto ImageSource detection

See original GitHub issue

ImageSource is needed as a previous step to load any image. This is fine and a view will normally load the same image source type. But what happens if the type changes?

The edge case: I found myself doing an avatar picker. When a pic is selected, it will load the image from a local file. If the user save changes in the form, the image will upload to server and next time he/she opens up the screen it will load the avatar from internet. So the image source type can change from “file” to “url”. I could even want to load an embedded resource when the user image is not set yet.

In a mvvm scenario this is a bit tricky as you can´t simply bind DataLocation. My idea is to detect the source type automatically by examining the image path.

I certainly know that urls will start with “http”. But I´m not sure about the rest of the source types. For instance, in mvvvmcross, they solve this by adding “res:” prefix to embedded resources. I would prefer to use some kind of regex to infer the source type but at this point I´m not sure it can be done for all cases (need to investigate more)

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:19 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
molinchcommented, Mar 13, 2016

👍 I will try to integrate it during the week

0reactions
daniel-luberdacommented, May 13, 2017

@bspinner @xleon MvxImageLoadingView is obsolete now and replaced with MvxCachedImageView

Read more comments on GitHub >

github_iconTop Results From Across the Web

Selecting an Image Source
Note: If you turned on the Auto Source Search setting in the Extended menu, the projector automatically switches to another detected image source...
Read more >
ImageSource Inc. - Process Innovation Made Easy
Leverage self-service, automated search, status tracking, and smart redaction to fulfill requests quickly and comprehensively with less risk. Cloud Computing.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found