ListView also made a call to find the original index of the selected element <p>There are two static ArrayList located in the main activity. I put this data in the ListView to fragment and search procedures would apply. But refreshing the index s search results. How can I get the original index of the selected element? Thank you </p> <pre><code> adapter = new ArrayAdapter&lt;String&gt;(getActivity(), R.layout.list_item, R.id.product_name, SimpleTabsActivity.name_man); lv.setAdapter(adapter); lv.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView&lt;?&gt; parent, View view, int position, long id) { Toast.makeText(getActivity(),SimpleTabsActivity.mean_man.get(position),Toast.LENGTH_LONG).show(); } }); inputSearch.addTextChangedListener(new TextWatcher() { @Override public void onTextChanged(CharSequence cs, int arg1, int arg2, int arg3) { // When user changed the Text adapter.getFilter().filter(cs); adapter.notifyDataSetChanged(); } @Override public void beforeTextChanged(CharSequence arg0, int arg1, int arg2, int arg3) { // TODO Auto-generated method stub } @Override public void afterTextChanged(Editable arg0) { // TODO Auto-generated method stub } }); </code></pre>