Created
August 16, 2020 11:47
-
-
Save farhanfahim/bd1fae972ed648f38dae4c7d6fd28e04 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
private fun showDialog(title:String,message:String){ | |
val mDialogView = LayoutInflater.from(context).inflate(R.layout.layout_dialog,null) | |
val mBuilder = AlertDialog.Builder(context) | |
.setView(mDialogView) | |
val alertDialog = mBuilder.show() | |
mDialogView.tv_title.text = title | |
mDialogView.tv_desc.text = message | |
mDialogView.btn_ok.setOnClickListener { | |
alertDialog.dismiss() | |
} | |
mDialogView.btn_cancel.setOnClickListener{ | |
alertDialog.dismiss() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment