代码之家  ›  专栏  ›  技术社区  ›  Drake

图像未在listview中呈现

  •  0
  • Drake  · 技术社区  · 6 年前

    SFListView 显示图像。它适用于大多数图像,但有些图像很少渲染。总是一样的。我检查了我的浏览器中的图像网址,它显示了预期的图像。这是图像的xaml:

    <Image AbsoluteLayout.LayoutFlags="All"  AbsoluteLayout.LayoutBounds="0,0,1,1" HorizontalOptions="FillAndExpand" Aspect="AspectFit">
        <Image.GestureRecognizers>
            <TapGestureRecognizer Command="{Binding Path=BindingContext.AddCommand, Source = {x:Reference listView}}" CommandParameter="{Binding}" />
        </Image.GestureRecognizers>
    
        <Image.Source>
            <UriImageSource Uri="{Binding ImageURL}" CacheValidity="1" CachingEnabled="true"/>
        </Image.Source>
    </Image>
    

    我最近更改了xaml以直接绑定到 UriImageSource 所以我可以利用缓存,在这个改变之前我没有这个问题,所以我知道问题不是URL。它现在不能正确呈现特定的图像,知道为什么吗?我正在安卓设备上测试。

    0 回复  |  直到 6 年前