title: How to store ID inside ListView and show data like <option value="id">data</option> in android java
body: <p>I'm working on listview on android, each item as its own id and I don't want to display it to the users
  for example </p>
  
  <pre><code>List&lt;String&gt; carModelList = new ArrayList&lt;&gt;();
  carModelList.add("car1");
  carModelList.add("car2");
   adapter = new CustomView(this, (ArrayList&lt;String&gt;) carModelList);
   mListview.setAdapter(adapter);
  </code></pre>
  
  <p>Now i know the output will be</p>
  
  <pre><code>car1
  car2
  </code></pre>
  
  <p>But what i need is</p>
  
  <pre><code>List&lt;String&gt; carModelList = new ArrayList&lt;&gt;();
  carModelList.add("hidden unique id","car1");//like &lt;option value="hidden unique id"&gt;car1&lt;/option&gt;
  carModelList.add("hidden unique id","car2");
   adapter = new CustomView(this, (ArrayList&lt;String&gt;) carModelList);
   mListview.setAdapter(adapter);
  </code></pre>
  
  <p>the output should be like</p>
  
  <pre><code>car1
  car2
  
  //when i set the OnItemClickListener
  mListview.setOnItemClickListener((parent, view, position, id) -&gt; {
  
       mListview.getItemAtPosition(position).toString()// should give car1 or car2
       mListview.getHiddenUniqueIdAtPosition(position).toString()//should give hidden unique id
  
  }
  </code></pre>