title: How to reset Id of list_view item in each tab in TabHost?
body: <p>I have a layout in which there is two tab(implemented by "TabHost"), and in each tab I have a list_view with one item.
  as I found, the Id of the first item in the list_view which is in the second tab, starts from 1 instead of zero. I know this id is the continuation of the id of the last item of the first tab (As shown in the following images)</p>
  
  <p>Now the question is <em>How to make these id to start from zero for each tab?</em> .</p>
  
  <p>first consider this part for filling list view in All Tabs.</p>
  
  <pre><code>// Tab1
  TabHost.TabSpec LawSpec = tabHost.newTabSpec(Law_SPEC);
  LawSpec.setIndicator(Law_SPEC, getResources().getDrawable(R.drawable.searchimg));
  Intent LawIntent = new Intent(ListResult.this, LawResult.class);
  LawIntent.putExtra("Lawlist", LawList);
  LawSpec.setContent(LawIntent);
  
  //  Tab2
  TabHost.TabSpec ArticleSpec = tabHost.newTabSpec(Article_SPEC);
  ArticleSpec.setIndicator(Article_SPEC, getResources().getDrawable(R.drawable.searchimg));
  Intent ArticleIntent = new Intent(ListResult.this, ArticleResult.class);
  ArticleIntent.putExtra("Articlelist", ArticleList);
  ArticleSpec.setContent(ArticleIntent);
  </code></pre>
  
  <p>And in each Tab I have a ListAdapter:</p>
  
  <pre><code>// Tab1's List
  ListAdapter adapter = new SimpleAdapter(
      LawResult.this, LawList, R.layout.law_result_item,
      new String[]{"selectedId", TAG_body, TAG_tag},
      new int[]{R.id.idL, R.id.body, R.id.tags}
  );
  setListAdapter(adapter);
  
  
  // Tab2's List Adapter
  ListAdapter adapter = new SimpleAdapter(
      ArticleResult.this, ArticleList, R.layout.article_result_item,
      new String[]{"selectedId", TAG_body, TAG_tag},
      new int[]{R.id.idA, R.id.body, R.id.tags}
  );
  
  setListAdapter(adapter);
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/uulgj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uulgj.png" alt="tab1"></a></p>
  
  <p><a href="https://i.stack.imgur.com/LmpuN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LmpuN.png" alt="tab2"></a></p>