title: change imagebutton resource in listview
body: <p>Im working on simple feedreader app. in my main activity i have listview that show all items . in each row i have imagebutton for save that item and when user click on that the image of imagebutton must be change(like fav icon on twitter) but it does not change ! After scrolling changes are observed !</p>
  
  <p>this is my row layout .</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:descendantFocusability="blocksDescendants" &gt;
  
  &lt;TextView
      android:id="@+id/tvListViewItemTitle"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentRight="true"
      android:layout_alignParentTop="true"
      android:layout_marginRight="15dp"
      android:layout_marginTop="15dp"
      android:text="@string/listview_item_title"
      android:textSize="25dp" /&gt;
  
  &lt;TextView
      android:id="@+id/tvListViewItemText"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignRight="@+id/tvListViewItemTitle"
      android:layout_below="@+id/tvListViewItemTitle"
      android:layout_marginTop="20dp"
      android:text="@string/listview_item_text"
      android:textSize="18dp" /&gt;
  
  &lt;TextView
      android:id="@+id/tvListViewItemTime"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignRight="@+id/tvListViewItemText"
      android:layout_below="@+id/tvListViewItemText"
      android:layout_marginTop="22dp"
      android:paddingTop="5dp"
      android:text="@string/listview_item_time" /&gt;
  
  &lt;ImageButton
      android:id="@+id/ibListViewItemSave"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentLeft="true"
      android:layout_alignTop="@+id/tvListViewItemTime"
      android:layout_marginLeft="20dp"
      android:paddingTop="11dp"
      android:src="@drawable/icon_save_story_2x"
      android:background="@null" /&gt;
  </code></pre>
  
  <p></p>
  
  <p>and this is my custom adapter class.</p>
  
  <pre><code>public class FeedListAdapter extends ArrayAdapter&lt;FeedItem&gt; {
  private final Activity context;
  private final List&lt;FeedItem&gt; list;
  
  public FeedListAdapter(Activity context, List&lt;FeedItem&gt; list) {
      super(context, R.layout.feed_listview_item_type1, list);
      this.context = context;
      this.list = list;
  }
  
  static class ViewHolder {
      TextView tvTitle;
      TextView tvText;
      TextView tvTime;
      ImageButton ibSave;
  }
  
  @Override
  public View getView(int position, View convertView, ViewGroup parent) {
      View rowView = convertView;
  
      if (rowView == null) {
          LayoutInflater inflater = (LayoutInflater) context
                  .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
          rowView = inflater.inflate(R.layout.feed_listview_item_type1, parent,false);
          // configure view holder
          ViewHolder holder = new ViewHolder();
  
          holder.tvTitle = (TextView)rowView.findViewById(R.id.tvListViewItemTitle);
          holder.tvText = (TextView)rowView.findViewById(R.id.tvListViewItemText);
          holder.tvTime = (TextView)rowView.findViewById(R.id.tvListViewItemTime);
          holder.ibSave = (ImageButton)rowView.findViewById(R.id.ibListViewItemSave);
  
          rowView.setTag(holder);
      }
      // fill data
      ViewHolder holder = (ViewHolder) rowView.getTag();
      final FeedItem feedItem = list.get(position);
      holder.tvTitle.setText(feedItem.getTitle());
      holder.tvText.setText(feedItem.getText());
      holder.tvTime.setText(feedItem.getTime());
  
  
      if(feedItem.isSave()) holder.ibSave.setImageResource(R.drawable.icon_saved_story_2x);
      else holder.ibSave.setImageResource(R.drawable.icon_save_story_2x);
  
      final String msg = " "+(position+1);
      holder.ibSave.setOnClickListener(new OnClickListener() {
  
          @Override
          public void onClick(View arg0) {
  
              if(feedItem.isSave()){
                  feedItem.setSave(false);
                  Toast.makeText(context,
                          msg+"deleted", Toast.LENGTH_SHORT).show();
                  //holder.ibSave.setImageResource(R.drawable.icon_save_story_2x);
              }else{
                  feedItem.setSave(true);
                  Toast.makeText(context,
                          msg+"saved", Toast.LENGTH_SHORT).show();
                  //holder.ibSave.setImageResource(R.drawable.icon_saved_story_2x);
              }
  
          }
      });
      return rowView;
  }
  </code></pre>
  
  <p>}</p>