Abdullah
12/02/2023, 8:54 PMclass BitmapListConverter {
@TypeConverter
fun toBitmapList(bitmap: Bitmap): ArrayList<Bitmap> {
return arrayListOf(bitmap)
}
@TypeConverter
fun fromBitmapList(array:ArrayList<Bitmap>): Bitmap {
val bmp = Bitmap.createBitmap(100, 100, Bitmap.Config.ARGB_8888)
return if (array.isEmpty()) bmp else array.first() //this causing issue
}
}
Hi I need to converter for ArrayListBitmap for room database but my converter is wrong I think. How can resolve it?Christiano
12/03/2023, 10:42 PM