How to create a SingleChoice AlertDialog in Android (Kotlin)
DESCRIPTION In this tutorial we will create alert dialog with single choice from list of items. We will create a button that show alert dialog when that button is clicked, a TextView that shows the selected item from dialog. VIDEO SOURCE CODE Step 1: Create a new project OR Open your project Step 2: Code activity_main.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android= "http://schemas.android.com/apk/res/android" xmlns:app= "http://schemas.android.com/apk/res-auto" xmlns:tools= "http://schemas.android.com/tools" android:layout_width= "match_parent" android:layout_height= "match_parent" android:padding= "20dp" android:orientation= "vertical" tools:context= ".MainActivity" > <Button android:id= "@+id/showAlertDialogBtn" android:t...