Unable to upate ListView data
<p>I have a class A which extends Activity. From the class A ,I am calling Adapter class B which extends BaseAdapter.</p>

<p>I am displaying ListView data from within the overriden method 
public View getView(final int position, View convertView, ViewGroup parent)</p>

<p>I am fetching the data for the ListView from SQLite. Now on clicking on a cancel button for a specific listitem , I am able to delete the record the data from the database , but unable to refresh the view . Still the data is being displayed . But if again I navigate to the screen from the home screen , the data is not being displayed , indicating there is no problem with the database , only updating display is a issue .</p>

<p>The skeletal code is as follows:</p>

<pre><code>class A extends Activity {

    B adapter ;
    ListView list ;

    public void onCreate(Bundle savedInstanceState) {

        list = (ListView) findViewById(R.id.textList);
        // I am calling the adapter

        adapter = new B(this, txtStr);
        list.setAdapter(adapter);
    }

    class B extends BaseAdapter{
        public View getView(final int position, View convertView, ViewGroup parent){

            // on click of the delete button , record is delated for a specific
            // listitem &amp; the view needs to be updated , but I am unable to update the view

            holder.deleteImage.setOnClickListener(new OnClickListener() {
                    private int pos = position;
                    public void onClick(View v) {// (position)) -- what was this doing here? (dbreslau)

                        sampleDB.execSQL("DELETE FROM " + Constants.TABLE_NAME + " where id = 1");
                        adapter.notifyDataSetChanged();
                    }
                });
        }
    }
}
</code></pre>

<p><strong>Even after calling the notifyDataSetChanged , the view is not getting updated.
Kindly help if anyone already implemented the same.</strong></p>
