Q:

remove duplicate item arraylist android

Here I'm trying to display list of state fetched from mysql db, code is displaying the list but same item is being displayed multiple times.
Please help to remove duplicate entries here I'm pasting my function 
protected void showList()
{
    try{
        JSONObject jsonObj = new JSONObject(myJSON);
        peoples = jsonObj.getJSONArray(TAG_RESULTS);

        for(int i=0;i<peoples.length();i++){
            JSONObject c = peoples.getJSONObject(i);
           // String loc = c.getString(TAG_LOCATION);
            //String dist = c.getString(TAG_DIST);
            String state = c.getString(TAG_STATE);

            HashMap<String,String> persons = new HashMap<String,String>();

            //persons.put(TAG_LOCATION,loc);
            //persons.put(TAG_DIST,dist);

            if(!personList.contains(state.toString())) {
                persons.put(TAG_STATE, state);
                personList.add(persons);
            }
        }

        ListAdapter adapter = new SimpleAdapter(
                Location.this,personList,R.layout.simple_list_item_1,
                new String[]{TAG_STATE},
                new int[]{R.id.tvLocation}
        );
        list.setAdapter(adapter);
    }catch (JSONException e){
        e.printStackTrace();
    }
    pd1.dismiss();

}

A:

persons.put(TAG_STATE, state);  

if (!personList.contains(persons)) {
  // take this to top and then check 
  //persons.put(TAG_STATE, state); 
  personList.add(persons);
}

