title: Smoothing is not there in android listview scrolling, like whatsapp new chat contact list does
body: <p>I have my listview with 1 image view and 2 text views but when I scroll it down it don't work smooth, so what should I do??</p>
  
  <p>Now here is my code..</p>
  
  <pre><code>class ReceiptAdapter extends BaseAdapter {
  
      ArrayList&lt;GetterSetter&gt; receiptlist;
      private LayoutInflater inflater;
  
      // private int[] colors = new int[] { Color.parseColor("#C8A6DA"),
      // Color.parseColor("#F6F4AB"), Color.parseColor("#A2C3D0"),
      // Color.parseColor("#F1B4A1") };
  
      private int[] colors = new int[] { Color.parseColor("#2280aee3"),
              Color.parseColor("#22888888") };
  
      public ReceiptAdapter(Context context,
              ArrayList&lt;GetterSetter&gt; receiptlist) {
          // TODO Auto-generated method stub
          this.receiptlist = receiptlist;
          // inflater = LayoutInflater.from(context);
          // inflater = LayoutInflater.from(context.getApplicationContext());
          inflater = (LayoutInflater) getActivity().getSystemService(
                  Context.LAYOUT_INFLATER_SERVICE);
      }
  
      @Override
      public int getCount() {
          // TODO Auto-generated method stub
          return receiptlist.size();
      }
  
      @Override
      public Object getItem(int arg0) {
          // TODO Auto-generated method stub
          return null;
      }
  
      @Override
      public long getItemId(int position) {
          // TODO Auto-generated method stub
          return position;
      }
  
      @Override
      public View getView(int position, View convertView, ViewGroup parent) {
          // TODO Auto-generated method stub
          ViewHolder holder = null;
          if (convertView == null) {
              // convertView = inflater.inflate(R.layout.custom_list, null);
              convertView = inflater.inflate(R.layout.custom_list, parent,
                      false);
  
              // if (position % 2 == 1) {
              // convertView.setBackgroundColor(Color.BLUE);
              // } else {
              // convertView.setBackgroundColor(Color.CYAN);
              // }
  
              int colorPos = position % colors.length;
              convertView.setBackgroundColor(colors[colorPos]);
  
              holder = new ViewHolder();
              holder.Title = (TextView) convertView.findViewById(R.id.name);
              holder.Total = (TextView) convertView.findViewById(R.id.total);
              holder.Img = (ImageView) convertView
                      .findViewById(R.id.profile_image);
  
              Animation animation = null;
              animation = AnimationUtils.loadAnimation(getActivity(),
                      R.anim.wave);
              animation.setDuration(200);
              convertView.startAnimation(animation);
              animation = null;
  
              convertView.setTag(holder);
          } else {
              holder = (ViewHolder) convertView.getTag();
          }
  
          holder.Title.setText(receiptlist.get(position).getTitle());
          holder.Total.setText(receiptlist.get(position).getTotal());
  
          String path = receiptlist.get(position).getImg();
          File fileImg = new File(path);
          Bitmap bitmap = null;
          if (fileImg.exists()) {
  
              BitmapFactory.Options options = new BitmapFactory.Options();
              options.inSampleSize = 7;
  
  
  
              bitmap = BitmapFactory.decodeFile(fileImg.getAbsolutePath(),
                      options);
  
              // bitmap = BitmapFactory.decodeFile(fileImg.getAbsolutePath());
              holder.Img.setImageBitmap(bitmap);
  
          }
          else
          {
              Bitmap icon = BitmapFactory.decodeResource(getActivity().getResources(),
                      R.drawable.no_image);
  
              holder.Img.setImageBitmap(icon);
          }
  
          holder.Img.setScaleType(ScaleType.CENTER_CROP);
  
          return convertView;
      }
  
      class ViewHolder {
          TextView Title;
          TextView Total;
          ImageView Img;
      }
  
  
  }
  </code></pre>
  
  <p>and my async task in which in postExecute() I am calling the custom list adapter as,</p>
  
  <pre><code>ReceiptAdapter adapter = new ReceiptAdapter(getActivity(),
                          recList);
                  setListAdapter(adapter);
  </code></pre>
  
  <p>So, my question is where am I getting wrong?</p>
  
  <p>Like in whatsapp though in contact list, it loads images and shows in image view, I am getting images from sd card and showing in image view, so why the scroll view can't work smoothly? </p>
  
  <p>Whats should I implement for that?</p>
  
  <p>I have searched many code also on stackoverflow, too but I found the same errors of others but didn't get any good feasible solution, so if anybody could help me out in this, then it would be appreciated. Thanks a tone!</p>