Created
November 1, 2017 12:14
-
-
Save abdul-rehman-2050/bb35fdfe9027b79057276d7486506dad to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LayoutInflater factory = LayoutInflater.from(this); | |
final View deleteDialogView = factory.inflate(R.layout.mylayout, null); | |
final AlertDialog deleteDialog = new AlertDialog.Builder(this).create(); | |
deleteDialog.setView(deleteDialogView); | |
deleteDialogView.findViewById(R.id.yes).setOnClickListener(new OnClickListener() { | |
@Override | |
public void onClick(View v) { | |
//your business logic | |
deleteDialog.dismiss(); | |
} | |
}); | |
deleteDialogView.findViewById(R.id.no).setOnClickListener(new OnClickListener() { | |
@Override | |
public void onClick(View v) { | |
deleteDialog.dismiss(); | |
} | |
}); | |
deleteDialog.show(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment