Giter Site home page Giter Site logo

Comments (5)

amitshekhariitbhu avatar amitshekhariitbhu commented on April 28, 2024

@AndroidHitchhiking
Instead of using this direct in an adapter, Using this will solve your problem.

<com.androidnetworking.widget.ANImageView
          android:id="@+id/img"
          android:layout_width="100dp"
          android:layout_height="100dp"
          android:layout_gravity="center" />

and call this in adapter .

      img.setDefaultImageResId(R.drawable.default);
      img.setErrorImageResId(R.drawable.error);
      img.setImageUrl(imageUrl);

As this uses memcache and proper canceling of request when user scroll the view.

And the problem that you are getting is because of the continuous decoding of bitmap as there is no cancelation and no bitmap caching in memcache. So use the above code.

Glide use a bitmap pool concept that we are going to implement it here. You can read more about that here

Anyway as you told, it must be like glide or picasso. We will add it in future upcoming release. It will be great if anybody will help me do it fast as soon as possible.

from fast-android-networking.

mupm1 avatar mupm1 commented on April 28, 2024
  • can i use , like Picasso ? or "com.androidnetworking.widget.ANImageView" Circular?
    Picasso.with(mContext).load(item.getImage())
    .placeholder(R.drawable.shopping_bag)
    .error(R.drawable.shopping_bag)
    .centerCrop()
    .fit()
    .into(holder.imgShop);

from fast-android-networking.

amitshekhariitbhu avatar amitshekhariitbhu commented on April 28, 2024

@mupm1 The best library for Image loading is Glide.

from fast-android-networking.

mupm1 avatar mupm1 commented on April 28, 2024

@amitshekhariitbhu can you speake persian?

from fast-android-networking.

Nasiralityagi avatar Nasiralityagi commented on April 28, 2024

Volley isn’t particularly efficient for loading images because it copies all data it receives into byte arrays. Although Volley attempts to re-use these byte arrays, it’s recycling rate is relatively poor for moderate or large images. As a result, Volley can tend to cause a fair amount of memory churn when used with Glide to load images but Glide is faster then Volley and any other.

from fast-android-networking.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.