Skip to main content

Posts

Showing posts with the label Alert Dialog

Alert Dialog in Kotlin

 Alert Dialog in Kotlin activity_alert_dialog_example.xml This activity activity_alert_dialog_example.xml we are creating a button which on click will display the alert dialog <? xml version= "1.0" encoding= "utf-8" ?> < LinearLayout xmlns: android = "http://schemas.android.com/apk/res/android" xmlns: tools = "http://schemas.android.com/tools" xmlns: app = "http://schemas.android.com/apk/res-auto" android :layout_width= "match_parent" android :layout_height= "match_parent" tools :context= ".AlertDialogExample" android :orientation= "vertical" > < Button android :layout_width= "match_parent" android :layout_height= "wrap_content" android :id= "@+id/alertButton" android :text= "Alert Dialog Example" /> </ LinearLayou...