Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

Load ImageSource depending on current screen resolution

$
0
0

Hi folks,

I've got the following situation: Using a ListView, my app displays certain topics (kind of a FAQ). Each topic got it's own icon. With a StackLayout, I place an image next to the topic's headline. Since we should target different resolutions, I refered to https://developer.xamarin.com/guides/xamarin-forms/user-interface/images/

Now we need to change the app to download those icons from a REST-API. Until now, I placed the different resolutions inside the different directories (drawable-hdpi, etc.) on Android and using different names like xxx.png, xxx@2x.png, etc. on iOS. Now the images are downloaded from the web. Since using one image all time (e.g. a high-res image) leads to scaling artifacts, I'm looking for another solution. Ideally, I want to load the images once (since they don't change, save bandwith, etc.) and display them with more control over the scaling. Any ideas?

Thank you!
Martin


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>