why is notifyDataSetChanged() not working in my code?
<p>Why is my code not working? I have already tried using notifyDataSetChanged(), or using invalid() for my listview, or using .setAdapter() again for my adapter, but its still not working please help me.
public class ListDel extends Activity{</p>

<pre><code>ListView mylist_del;
ListViewAdapter listViewAdapter_del;
TypedArray images_del;
ImageView bin_image;

private static String[] names, ages;
storageListImplementation lists = new storageListImplementation();

public void onCreate(Bundle savedInstanceState) { 
    super.onCreate(savedInstanceState);
    setContentView(R.layout.del_layout);

    names = lists.getNames();
    ages = lists.getAges();
    images_del = getResources().obtainTypedArray(R.array.icons);
    bin_image = (ImageView)findViewById(R.id.del_image_icon);

    listViewAdapter_del = new ListViewAdapter(this);
    mylist_del = (ListView)findViewById(R.id.listview_delete);
    mylist_del.setAdapter(listViewAdapter_del);

}

private class ListViewAdapter extends BaseAdapter{
    private LayoutInflater mInflater;

    public ListViewAdapter(Context context){
        mInflater = LayoutInflater.from(context);
    }

    public int getCount() {
        return names.length;
    }

    public Object getItem(int pos) {
        return pos;
    }

    public long getItemId(int position) {
        return position;
    }

    private OnClickListener binClick(ImageView img, final int position, String name) {

        return new View.OnClickListener(){
            public void onClick(View v) {
                lists.del(names[position]);
                mylist_del.invalidate();
                //mylist_del.setAdapter(listViewAdapter_del);
                listViewAdapter_del.notifyDataSetInvalidated();
                listViewAdapter_del.notifyDataSetChanged();                 

                //newlistviewadap();
                //mylist_del.setAdapter(new ListViewAdapter(this));
                //listViewAdapter_del.notifyDataSetChanged();
                //String addSuccessful = "You have successfully deleted "+names[position]+" and his/her information in you database";
                //Toast.makeText(getApplicationContext(), addSuccessful, Toast.LENGTH_LONG).show();

                //ListDel.this.finish();
            } 
        };
    }

    public void newlistviewadap(){

        mylist_del.setAdapter(listViewAdapter_del);
    }

    public View getView(int position, View convertView, ViewGroup parent) {
        ViewHolder textView;
        if(convertView==null){
            convertView = mInflater.inflate(R.layout.del_listview_row, null);
            textView = new ViewHolder();
            textView.text = (TextView) convertView.findViewById(R.id.del_values_row);
            textView.age = (TextView) convertView.findViewById(R.id.del_age_row);
            textView.image = (ImageView) convertView.findViewById(R.id.del_image);
            textView.delbutton = (ImageView) convertView.findViewById(R.id.del_image_icon);
            convertView.setTag(textView);
        }else{
            textView = (ViewHolder) convertView.getTag();
        }

        textView.text.setText(names[position]);
        textView.age.setText(ages[position]);

        textView.image.setImageDrawable(images_del.getDrawable(position));
        textView.delbutton.setOnClickListener(binClick( textView.delbutton, position, names[position]));
        return convertView;
    }

}

static class ViewHolder{
    TextView text;
    TextView age;
    ImageView image;
    ImageView delbutton;
}
</code></pre>

<p>}</p>
