Metuuu
8/14/2017 - 6:47 AM

Get view position at RecyclerView Adapter onCreateViewHolder()

Get view position at RecyclerView Adapter onCreateViewHolder()

    @Override
    public IndustriesHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        final View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.cell, parent, false);
        final ViewHolder holder = new ViewHolder(view) {};
        final int position = holder.getAdapterPosition();
        return new IndustriesHolder(view);
    }