builder.setView (v);builder.setPositiveButton («Отправить», новый DialogInterface.OnClickListener () {
@Override
public void onClick(DialogInterface dialog, int which) {
EditText edituser ;
edituser = (EditText) findViewById(R.id.edit_username);
Database myDB;
myDB = new Database(MainActivity.this);
boolean isInserted = myDB.DataInput(edituser.getText().toString());
if(isInserted == true)
Toast.makeText(MainActivity.this,"Data Inserted",Toast.LENGTH_LONG).show();
else
Toast.makeText(MainActivity.this,"Data not Inserted",Toast.LENGTH_LONG).show();
Dialog();
}
})
.setNegativeButton("Cancel",null)
.setCancelable(false);