Подскажите. Пытаюсь поменять картинку в лайоуте диалогового окна, но получаю краш:
val alertDialog: AlertDialog?
val dialogBuilder = AlertDialog.Builder(this)
val layoutView: View = layoutInflater.inflate(R.layout.dialog_postive_layout, null)
imageView.setImageResource(R.drawable.tiles_three);
val dialogButton =
layoutView.findViewById<Button>(R.id.btnDialog)
dialogBuilder.setView(layoutView)
alertDialog = dialogBuilder.create()
alertDialog.window!!.getAttributes().windowAnimations = R.style.DialogAnimation
alertDialog.window!!.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
alertDialog.show()
dialogButton.setOnClickListener { alertDialog.dismiss() }