AlertDialog.Builder dlg = new AlertDialog.Builder(this);
dlg.setTitle("警告");
dlg.setMessage("确定要删除数据库内容吗,一旦删除数据将不能恢复!!!");
dlg.setNegativeButton("取消",null);
dlg.setPositiveButton("确定",new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
if(sqliteOpenHelper==null)
{
return;
}
sqliteOpenHelper.deleteall();
m_showlog.setText("数据清除完成");
}
});
dlg.create();
dlg.show();