I have a RecylerView adapter where I am handling onClicks in the onCreateViewHolder method, however I cannot figure out a way to get the current position. My current method looks like this:
@Override public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { View itemView = LayoutInflater.from(parent.getContext()) .inflate(R.layout.card_small, parent, false); return new ViewHolder(itemView, new ViewHolder.IViewHolderClicks() { @Override public void onImage(ImageView image) { // Need the position for logic in here // for example, myArrayList.get(position); } }); } Does anybody know how to access the current position from within onCreateViewHolder?