RecyclerView Checkbox Android Example Get Checked Item Position

Warm welcome to RecyclerView Checkbox Android Studio example.

In this RecyclerView Checkbox Android example, we will cover single selection, multiple selection and also select all scenario.

There is a common problem like “checkbox unchecked when I scroll recyclerview.” We will solve this problem in this  RecyclerView Checkbox Android tutorial.

We will also send selected or checked items to next activity.

You can learn how to use onItemClickListener, onClickListener, onItemTouchListener etc. for recyclerview.

If you have not implement basic recyclerview with custom adapter yet, check recyclerview android example first.

Now checkout the output of RecyclerView Checkbox Android example, then we will develop it.

How to get maximum benefit from RecyclerView Checkbox Android tutorial

Click to know benefits

Download Source Code for RecyclerView Checkbox Android example

Try Our App

Download DemoNuts app to learn anytime, anywhere: Click to get demonuts app

Or search “demonuts” in play store from android mobile device.

Creating RecyclerView Checkbox Android Studio programmatically example step by step

If you are using adblocker, then you will not be able to show our site smoothly. For example, you find step 6 after step 1 or similar to this. So please disable adblocker to fully utilize all resources of DemoNuts

Step 1: Create a new project in Android Studio.

Step 2: Updating build.gradle(Module:app) file

Add below source code into dependencies{}

Step 3: Coding cardview.xml

Create a new file into drawable folder and name it cardview.xml

Add below source code into it.

Step 4: Making rv_item.xml

Create a new layout resource file named rv_item.xml

Copy following source code into it

Step 5: Making Model class

Create a new JAVA class named and paste below

Step 6: Adding integer.xml

Create a new file named integer.xml  in values directory and add below

Step 7: Code for

Let’s create Custom Adapter for RecyclerView.

Make a new JAVA class named and add below

Describing CustomAdapter

Above code will set a tag for position.

Now look at below source code

We will get position (which we set above using setTag() method) in onClick method.

Step 8: Making NextActivity

Create a new activity named “NextActivity

Add below source code into

Copy following code into activity_next.xml

Step 9: Finally Update activity_main.xml and

Updating activity_main.xml

Add following into activity_main.xml


Copy folowing into

Get great search result

Click to get great Google searching tips

So all for RecyclerView Checkbox Android tutorial. Thank you ?

Hardik Parsania

I am mobile app developer. I am always passionate about solving complex and real world problems.I have developed many apps with great interest and superior logical skills.

You may also like...

9 Responses

  1. Sankar says:

    I found your source code, actually my adBlocker was blocking it. superior logic, simple yet effective. Great work.

  2. vaibhav says:

    Thank uthis help me alot..

    pls help me to solve one more prob.
    when i change orientation my checkboxes in cardview get unchecked.

  3. Smita P says:


    May i Know how to store the values in firebase database with the help of Checkbox?

  4. Christy Harris says:

    Great tutorial, helped me a lot. +1 (if I could)

  5. Devil says:

    Where is The Source Code Link..??????

    • Hardik Parsania says:

      Soon after intoduction video.
      It is locked by default. Like Our facebook page to unlock download source code button. Cheers!

Leave a Reply

Your email address will not be published. Required fields are marked *