dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.24k stars 1.76k forks source link

[android] warnings from Glide for image URLs #11065

Open jonathanpeppers opened 2 years ago

jonathanpeppers commented 2 years ago

Description

I see lots of warnings from Glide, like:

[CustomViewTarget] Glide treats LayoutParams.WRAP_CONTENT as a request for an image the size of this device's screen dimensions. If you want to load the original image and are ok with the corresponding memory cost and OOMs (depending on the input size), use .override(Target.SIZE_ORIGINAL). Otherwise, use LayoutParams.MATCH_PARENT, set layout_width and layout_height to fixed dimension, or use .override() with fixed dimensions.

It's worth checking if we can change something to make this warning go away, it would help image performance?

If we are indeed doing this on purpose, we should hide the console output?

Steps to Reproduce

I was testing a CollectionView like:

const int count = 30;
var list = new List<string>(count);
for (int i = 1; i <= count; i++)
{
    list.Add ($"https://images.pokemontcg.io/sm35/{i}_hires.png");
}
_collectionView.ItemsSource = list;
<CollectionView x:Name="_collectionView" ItemsLayout="VerticalGrid, 4" ItemSizingStrategy="MeasureFirstItem">
    <CollectionView.ItemTemplate>
        <DataTemplate>
            <Image Source="{Binding}" />
        </DataTemplate>
    </CollectionView.ItemTemplate>
</CollectionView>

Link to public reproduction project repository

https://github.com/jonathanpeppers/card-effects/tree/2d6492e0f023b4f7f1579fae367368d31a902872

(Use the above commit)

Version with bug

7.0 Release Candidate 2

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Any Android

Did you find any workaround?

No

Relevant log output

No response

ghost commented 2 years ago

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

XamlTest commented 1 year ago

Verified this on Visual Studio Enterprise 17.7.0 Preview 1.0. Repro on Android 13.0-API33 with provided Project: CardEffects.MAUI.zip

image

bcaceiro commented 1 month ago

Also hitting these logs everytime I load an Image