getAdapterPosition returns -1 in ViewHolder class
问题 I'm trying to show an AlertDialog in my ViewHolder class and after clicking on accept button I'm getting the Model item with getAdapterPosition from a list of items but in Fabric Crashlytics I have 13 crashes because of ArrayIndexOutOfBoundsException which says length is 12 but the index requested is -1 and the crash is for getPaymentMode in this part of code class ViewHolder extends RecyclerView.ViewHolder { TextView time, capacity, description; View button; ImageView avatar; ViewHolder(View