Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Priyansh-Kedia committed Oct 2, 2020
1 parent 0f3bddb commit 40b686c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,9 @@ class CCMultiple : FrameLayout, CustomImageAdapter.CustomAdapterClick, Lifecycle

}

override fun onDeleteImageClicked(adapterPosition: Int) {
override fun onDeleteImageClicked(adapterPosition: Int, bitmap: Bitmap?) {
customCameraAdapter.removeItem(adapterPosition)
imageArrayList.remove(bitmap)
Log.d(TAG, imageArrayList.toString())
imageCount.text = "${customCameraAdapter.itemCount}"
if (customCameraAdapter.itemCount == 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ class CustomImageAdapter(
Glide.with(context).load(item).into(imageView)

cancelImage.setOnClickListener {
onClick?.onDeleteImageClicked(adapterPosition)
onClick?.onDeleteImageClicked(adapterPosition, item)
}
}

}

interface CustomAdapterClick {
fun onDeleteImageClicked(adapterPosition: Int)
fun onDeleteImageClicked(adapterPosition: Int, bitmap: Bitmap?)
}
}

0 comments on commit 40b686c

Please sign in to comment.