title: Add item to arraylist if it does not already exist in list
body: <p>Hi I have a listview showing an arraylist, when an item is clicked it is added to another arraylist and displayed in another activity. What is my problem? I want that if an item (eg a dog) I touch once, is added to the second activity, and it shows. But if I were to touch the item (dog) is not added again. </p>
  
  <p>We would say that I want to check if it exists, not add. </p>
  
  <p>I've tried so, but without success.</p>
  
  <pre><code>if (page2 == null)
  {
      page2 = (ListView) LayoutInflater.from(Local_mostrar_bebidaActivity.this).inflate(R.layout.page_two_viewpager_listview, null);
      page2.setAdapter(adapterlistvMenuVINOSespumosos);
      page2.setOnItemClickListener(new OnItemClickListener() {
          @Override
          public void onItemClick(AdapterView&lt;?&gt; parent, View view,
          int position, long id) {
              if (MiPedidoActivity.itemsListVMiPedido.contains( position)){}
              else
                  MiPedidoActivity.itemsListVMiPedido.add(itemsListVMenuVINOSespumosos.get(position));
  
          }});
      }
      page = page2;
      break;
  </code></pre>
  
  <p>Any ideas?</p>