title: Android setOnCheckedChangeListener runs twice
body: <p>This is my code. What can ba a cause?</p>
  
  <pre><code>holder.favorite.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
          @Override
          public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
              if (isChecked) {
                  addFavorite(famous);
              } else {
                  deleteFavorite(famous);
              }
          }
      });
  </code></pre>
  
  <p>When <code>isChecked=true</code>, firstly is run <code>addFavorite()</code> and after that <code>deleteFavorite()</code>.</p>
  
  <p>When <code>isChecked=false</code>, firstly is run <code>deleteFavorite()</code> and after that <code>addFavorite()</code>.</p>
  
  <p>Don't know why...</p>
  
  <p>EDIT: When I scroll down/up my <code>ListView</code> it calls these methods too... Weird...</p>
  
  <pre><code>    private void deleteFavorite(final FamousTop40Ranking famous) {
          DeleteFavoriteData data = new DeleteFavoriteData(famous.getId());
          FavoriteDeleteApi.Factory.getInstance().deleteFavorite(data.getData())
                  .enqueue(new Callback&lt;StatusInfoModel&gt;() {
                      @Override
                      public void onResponse(Call&lt;StatusInfoModel&gt; call, Response&lt;StatusInfoModel&gt; response) {
                          showToast(mActivity, "Famous deleted from your Favorites list.");
                          famous.setFollowersCountry(famous.getFollowersCountry() - 1);
                          famous.setFollowersWorld(famous.getFollowersWorld() - 1);
                          notifyDataSetChanged();
                      }
  
                      @Override
                      public void onFailure(Call&lt;StatusInfoModel&gt; call, Throwable t) {
                          Log.d("deleteFavorite", mActivity.getString(R.string.something_went_wrong) + t.getMessage());
                      }
                  });
      }
  
  
  
  
  private void addFavorite(final FamousTop40Ranking famous) {
          FavoriteCountApi.Factory.getInstance().countFavorites()
                  .enqueue(new Callback&lt;CountFavoriteModel&gt;() {
                      @Override
                      public void onResponse(Call&lt;CountFavoriteModel&gt; call, Response&lt;CountFavoriteModel&gt; response) {
                          if (response.isSuccessful()) {
                              if (response.body().getCount() &lt; 20) {
                                  FavoriteAddApi.Factory.getInstance().addFavorite(String.valueOf(famous.getId()))
                                          .enqueue(new Callback&lt;StatusInfoModel&gt;() {
                                              @Override
                                              public void onResponse(Call&lt;StatusInfoModel&gt; call, Response&lt;StatusInfoModel&gt; response) {
                                                  showToast(mActivity, "Famous added from your Favorites list.");
                                                  famous.setFollowersCountry(famous.getFollowersCountry() + 1);
                                                  famous.setFollowersWorld(famous.getFollowersWorld() + 1);
                                                  notifyDataSetChanged();
                                              }
  
                                              @Override
                                              public void onFailure(Call&lt;StatusInfoModel&gt; call, Throwable t) {
                                                  Log.d("addFavorite", mActivity.getString(R.string.something_went_wrong) + t.getMessage());
                                              }
                                          });
                              } else {
                                  showToast(mActivity, mActivity.getString(R.string.reached_max_favorites));
                              }
                          }
                      }
  
                      @Override
                      public void onFailure(Call&lt;CountFavoriteModel&gt; call, Throwable t) {
                          Log.d("countFavorite", mActivity.getString(R.string.something_went_wrong) + t.getMessage());
                      }
                  });
      }
  </code></pre>
  
  <p><code>getView()</code> method:</p>
  
  <pre><code>@Override
  public View getView(final int position, View convertView, ViewGroup parent) {
      final ViewHolder holder;
  
      if(convertView == null) {
          LayoutInflater inflater = (LayoutInflater) mActivity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
          convertView = inflater.inflate(R.layout.list_view_ranking_famous_single_item, parent, false);
      }
  
      final FamousTop40Ranking famous = famousModelList.get(position);
  
      holder = new ViewHolder(convertView);
  
      holder.name.setText(famous.getName());
      if (mTab == 0) { // RankingFamousMainFragment.TAB_FAMOUS
          holder.followers.setText(String.valueOf(famous.getFollowersWorld()));
      } else {
          holder.followers.setText(String.valueOf(famous.getFollowersCountry()));
      }
  
      if (famous.getIsFavorite().get(0).getFavorite().equals("1")) {
          holder.favorite.setChecked(true);
      } else {
          holder.favorite.setChecked(false);
      }
  
      Glide
              .with(mActivity)
              .load(famous.getPhoto())
              .fallback(R.drawable.bg_gradient)
              .error(R.drawable.bg_gradient)
              .centerCrop()
              .crossFade()
              .into(holder.photo);
  
      holder.favorite.setOnCheckedChangeListener(null);
      holder.favorite.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
          @Override
          public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
              if (isChecked) {
                  addFavorite(famous);
              } else {
                  deleteFavorite(famous);
              }
          }
      });
  
      convertView.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              showToast(mActivity, mActivity.getString(R.string.famous_clicked, position));
          }
      });
  
      return convertView;
  }
  </code></pre>