|
|
|
|
@ -20,9 +20,11 @@ class ContextMenuRecyclerView : RecyclerView { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
override fun showContextMenuForChild(originalView: View): Boolean { |
|
|
|
|
|
|
|
|
|
val longPressPosition = getChildAdapterPosition(originalView) |
|
|
|
|
if (longPressPosition >= 0) { |
|
|
|
|
val longPressId = adapter!!.getItemId(longPressPosition) |
|
|
|
|
val longPressId = adapter?.getItemId(longPressPosition) |
|
|
|
|
|
|
|
|
|
if (longPressPosition >= 0 && longPressId != null) { |
|
|
|
|
mContextMenuInfo = RecyclerViewContextMenuInfo(longPressPosition, longPressId) |
|
|
|
|
return super.showContextMenuForChild(originalView) |
|
|
|
|
} |
|
|
|
|
|