Bir düğmem var ve bastığınızda bir iletişim kutusu açmak istiyorum. Bu benim kodunuz: AlertDialog#show demiyorlar çünküBir düğmeyi tıkladığımda bir iletişim kutusu aç
Button more = (Button) findViewById(R.id.more);
more.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
//Intent myIntent = new Intent(view.getContext(), agones.class);
//startActivityForResult(myIntent, 0);
AlertDialog alertDialog = new AlertDialog.Builder(this).create();
alertDialog.setTitle("hi");
alertDialog.setMessage("this is my app");
alertDialog.setButton("Continue..", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
// here you can add functions
}
});
}
});
ne çalışmıyor? – RoflcoptrException
bunu kod uyarınıza ekleyinDialog.show(); – ingsaurabh
Yapıcı AlertDialog.Builder (yeni View.OnClickListener() {}) tanımlanmamış –