title: when i click on attachment button , it show me only the the title of alert dialog. So how to show the option in alert dialog
body: <p>This is a chat app, I want to display the options when a user click on attachment button and select one option like he want to send a picture or video or file documents to other user.<a href="https://i.stack.imgur.com/mVkDH.png" rel="nofollow noreferrer">like this screenshot</a></p>
  
  <p>But i am fail, when i click on attachment button it show me only the title of alert dialog.
  <a href="https://i.stack.imgur.com/ohRIf.png" rel="nofollow noreferrer">like this screenshot</a></p>
  
  <p>It is my code of attachment button, there is some thing which i missed or ....</p>
  
  <pre><code>        attachment.setOnClickListener {
          val option: Charsequence = Charsequence("Images" , "Videos" , "File Documents")
          val itemList = arrayOf("Images","Videos","File Documents")
          val builder = AlertDialog.Builder(this@ChatLogActivity)
          val title = builder.setTitle("Select The File")
          builder.setItems( itemList.toString() ,
              onClickListener = DialogInterface.OnClickListener { dialogInterface , i -&gt;
                  if (i == 0){
                      checker = "Images"
                      val intent = Intent(Intent.ACTION_GET_CONTENT)
                      intent.type = "image/*"
                      startActivityForResult(Intent.createChooser(intent, "Select Image"),438)
                  }
  
                  if (i == 1){
                      checker = "Videos"
                      val intent = Intent(Intent.ACTION_GET_CONTENT)
                      intent.type = "video/*"
                      startActivityForResult(Intent.createChooser(intent, "Select Video"),439)
                  }
  
                  if (i == 2){
                      checker = "File Documents"
                      val intent = Intent(Intent.ACTION_GET_CONTENT)
                      intent.type = "application/pdf"
                      startActivityForResult(Intent.createChooser(intent, "Select File Documents"),440)
                  }
              })
          builder.show()
      }
  </code></pre>