title: Android, refresh listview on item clicked
body: <p>I know their are a lot of question relative to refreshing listView, but none of them are anwering my problem (as far as I know).</p>
  
  <p><strong>I'm trying to change my item view when clicking on it in my list view.</strong></p>
  
  <p>To change the view I've got a <code>boolean isClicked</code> on my POJO :</p>
  
  <pre><code>        networksListView.setOnItemClickListener(new OnItemClickListener() {
          @Override
          public void onItemClick(AdapterView&lt;?&gt; _adapter, View view, int pos, long id) {
              myApp.networksGlobal.networks.get(pos);
              myApp.networksGlobal.networks.get(pos).isClicked = !myApp.networksGlobal.networks.get(pos).isClicked;
              adapter.notifyDataSetChanged();
          }
      });
  </code></pre>
  
  <p>When I click on the item <code>isClicked</code> switch from true to false, and on my <code>getView</code> listAdapted I'm switching the view type :</p>
  
  <pre><code>    @Override
  public View getView(int position, View convertView, ViewGroup parent) {
  
      Network network = (Network) getItem(position);
      NetworkItemView networkItemView;
      if (convertView == null) {
          networkItemView = NetworkItemView_.build(context);
      } else {
          networkItemView = (NetworkItemView) convertView;
      }
      networkItemView.bind(network);
      if (network.isClicked) {
          networkItemView.networkItemButtonLayout.setVisibility(View.VISIBLE);
      } else {
          networkItemView.networkItemButtonLayout.setVisibility(View.GONE);
      }
      return networkItemView;
  
  }
  </code></pre>
  
  <p>On the first click everything is working great, the Toast is shown an the Layout <code>networkItemButtonLayout</code> is set to visible.</p>
  
  <p>But if I click a second time on the same item : <strong>nothing happend</strong>. No Toast is shown and no changes on the Layout visibility.</p>
  
  <p>If I comment <code>adapter.notifyDataSetChanged()</code> the Toast is shown for every click. So I guess the problem is why the call to <code>adapter.notifyDataSetChanged()</code>. So tried several work around (<code>adapter.notifyDataSetChanged()</code> and <code>networksSearchListView.invalidateViews()</code>) but nothing do the trick, and I can't find a way to click several time on my item.</p>
  
  <p>Does I'm using 'notifyDataSetChanged' the proper way ?</p>