0
 delete.setOnClickListener(new OnClickListener(){

                @Override
                public void onClick(View v) {
                    Cursor c= myDB.rawQuery("DELETE FROM contacts where id_ctc='"+t+"'",null);
                    Intent i = new Intent(Dial.this,TabLayout.class);
                    startActivity(i);
                }         
              });

应用程序停止工作(不幸的是,Tablayout 有 stopprd。)

4

1 回答 1

1
public void onClick(View v) {
    myDB.delete(TABLE_CONTACTS, id_ctc + " = ?", new String[] { String.valueOf(t) });
    Cursor c= myDB.rawQuery("DELETE FROM contacts where id_ctc='"+t+"'",null);
    Intent i = new Intent(Dial.this,TabLayout.class);
    startActivity(i);
}     
于 2013-05-27T00:39:05.587 回答