whenever delete the record from sqlite databse navigate the activity to previous and display the records which available in databse
<p>In my application listview is available and in each row add button and show button available, whenever add button clicked the data is stored sqlite database.After show button clicked navigate the another activity in that all data displayed which is available in databse. And in that activity delete button is available,whenever delete button is clicked delete the record from the database at the same time navigate the activity to previous activity and display remaining records in that activity.And my question is how to navigate activity after delete the record from the databse.
This is my onclick listener
 if(v.equals(btnAddBeer)){</p>

<pre><code>            if(addCheck==true){
              if(helper.getBeerid(strBeerId).getCount()&gt;0)
              {
</code></pre>

<p>//                  Toast.makeText(MyBeersActivity.this, "Already added", Toast.LENGTH_SHORT).show();
                  }
                  else{</p>

<pre><code>               db = helper.getWritableDatabase();
               helper.insert(strBeerId,strBeerName,strBeerId,db);
               btnAddBeer.setBackgroundResource(R.drawable.deletebeer_reviews);
               Toast.makeText(MyBeersReviewsActivity.this, "Successfully added", Toast.LENGTH_SHORT).show();
               addCheck=false;
              }
            }
            else{



                helper.deleteRecord(strBeerId);
                Log.e("delete.....","successfully");

                new AlertDialog.Builder(getParent()) 
                .setTitle("Message")
                .setMessage(strBeerName+" is deleted successfully")
                .setPositiveButton(DataUrls.dialogbutton, new DialogInterface.OnClickListener() 
                {
                            public void onClick(DialogInterface dialog, int whichButton) 
                            {
                                MyBeersTabActivity.group.onBackPressed();
                            }
                }).show();
            }
        }
</code></pre>

<ol>
<li>List item</li>
</ol>
