开发者

How can I delete the clicked item from my database... I am new entry for android

    lv.setOnItemClickListen开发者_高级运维er(new OnItemClickListener() {

        @Override
        public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
                long arg3) {

            AlertDialog.Builder adb=new AlertDialog.Builder(activity2.this);
            adb.setTitle("Delete?");
            adb.setMessage("Are you sure you want to delete " + arg0);

            adb.setNegativeButton("Cancel", null);
            adb.setPositiveButton("Ok", new AlertDialog.OnClickListener() {
                public void onClick(DialogInterface dialog, int which) {
                    Toast.makeText(getApplicationContext(), "Delete", Toast.LENGTH_LONG).show();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜