【问题标题】:set NetworkImageView with Volley disable holder of the image使用 Volley 设置 NetworkImageView 禁用图像的持有者
【发布时间】:2014-05-21 13:24:34
【问题描述】:

我使用适配器加载了很多带有支架的图像,当我滚动图像时,问题正在加载,NetworkImageView 支架不再显示。

在适配器中我使用setImageUrl 设置图像内容

holderElementGridView.drawable2.setImageUrl(url,VolleySingleton.getInstance(mContext).getImageLoader());

和xml:

<com.android.volley.toolbox.NetworkImageView
    android:id="@+id/imageView"
    android:layout_width="wrap_content"
    android:layout_height="0dp"
    android:layout_gravity="center"
    android:layout_weight="100"
    android:layout_marginRight="5dp"
    android:layout_marginLeft="5dp"
    android:src="@drawable/iphone_feuilledematch_imagebackground" >
</com.android.volley.toolbox.NetworkImageView>

齐射下载图片时iphone_feuilledematch_imagebackground被禁用。

如何在 volley 完成 drawable 下载之前保留默认的 drawable 源?

【问题讨论】:

    标签: java android xml android-volley networkimageview


    【解决方案1】:

    您可以使用Picasso 代替 Volley,它可以按照您想要的方式工作。

    【讨论】:

    • 我已经在很多课程中集成了 Volley,换成 piccaso 会花费我很多时间。无论如何感谢您的回复
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-11-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-05-28
    • 1970-01-01
    • 2016-04-17
    相关资源
    最近更新 更多