private fun initQRCode() {
binding?.let {
val bindingRequired = it
val helloWorld = QRCode.ofRoundedSquares()
.withColor(R.color.colorPrimaryMid)
.withSize(90)
.build("Hello world!")
val pngBytes = helloWorld.render()
val byteArr = pngBytes.getBytes()
val bmp = BitmapFactory.decodeByteArray(byteArr, 0, byteArr.size)
bindingRequired.idIVQrcode.setImageBitmap(bmp)
}
}
Я пытался поставить точки останова на bmp и посмотреть, сгенерируется ли он, и получилось.
но на экране оно остается следующим:

объект xml:
Подробнее здесь: https://stackoverflow.com/questions/793 ... -not-worki