Get the value from selected rows of recyclerView (java)
<p>Well I have a RecyclerView  and I am selecting multiple values from that and want to append the value of selected rows into an array but I don't know what am doing wrong its returning null : my <code>adpater</code> </p>

<pre><code>import com.bignerdranch.android.multiselector.MultiSelector;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * Created by MACBOOK on 07/03/16.
 */


public class ChannelsAdapter extends RecyclerView.Adapter&lt;ChannelsAdapter.ChannelsViewHolder&gt; implements Filterable  {

    private LayoutInflater inflater;
    private Context context;

    List&lt;ChannelsInformation&gt; data = Collections.emptyList();

    private final List&lt;ChannelsInformation&gt; filteredChannelsList;

    private final MultiSelector mMultiSelector = new MultiSelector();

      ArrayList &lt;String&gt; selected;



    public ChannelsAdapter(Context context,  List&lt;ChannelsInformation&gt; data){

        inflater =  LayoutInflater.from(context);


        this.context = context;


        this.data = data;


        filteredChannelsList = data;
    }

    public void remove(int position){
        data.remove(position);
        notifyItemRemoved(position);
    }


    @Override
    public ChannelsViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {

        View rowView = inflater.inflate(R.layout.custom_channel_row, parent, false);

        ChannelsViewHolder holder = new ChannelsViewHolder(rowView);

        return holder;
    }

    @Override
    public void onBindViewHolder(final ChannelsViewHolder holder, final int position) {

        ChannelsInformation current = data.get(position);

        holder.CHANNELNAME.setText(current.channelName);
        holder.ID.setText(current.id);
        holder.mSolvedCheckBox.setChecked(current.isSelected);






    }

    @Override
    public int getItemCount() {
        return data.size();
    }

    @Override
    public Filter getFilter() {
        return new UserFilter(this ,filteredChannelsList);
    }

private static class UserFilter extends Filter {

    private final ChannelsAdapter adapter;

    private final List&lt;ChannelsInformation&gt; originalList;

    private final List&lt;ChannelsInformation&gt; filteredList;

    private UserFilter(ChannelsAdapter adapter, List&lt;ChannelsInformation&gt; originalList) {
        super();
        this.adapter = adapter;
        this.originalList = new ArrayList&lt;&gt;(originalList);
        this.filteredList = new ArrayList&lt;&gt;();
    }

    @Override
    protected FilterResults performFiltering(CharSequence constraint) {
        filteredList.clear();
        final FilterResults results = new FilterResults();

        if (constraint == null || constraint.length() == 0) {
            filteredList.addAll(originalList);



        } else {
            final String filterPattern = constraint.toString().toLowerCase().trim();


            for (final ChannelsInformation channel : originalList) {






            }
        }
        results.values = filteredList;
        results.count = filteredList.size();
        return results;
    }


    @Override
    protected void publishResults(CharSequence constraint, FilterResults results) {
        adapter.filteredChannelsList.clear();
        if  ((ArrayList&lt;ChannelsInformation&gt;) results.values != null ) {

            adapter.filteredChannelsList.addAll((ArrayList&lt;ChannelsInformation&gt;) results.values);
        }
        adapter.notifyDataSetChanged();

    } }






class ChannelsViewHolder extends SwappingHolder implements View.OnClickListener {

    TextView CHANNELNAME,ID;
    CheckBox mSolvedCheckBox;




    public ChannelsViewHolder(View itemView) {


        super(itemView , mMultiSelector);

        mMultiSelector.setSelectable(true);

        mSolvedCheckBox = (CheckBox) itemView.findViewById(R.id.selectedChannelCheckBox);

        itemView.setOnClickListener(this);

        CHANNELNAME = (TextView) itemView.findViewById(R.id.ChannelNameTxtView);
        ID = (TextView) itemView.findViewById(R.id.ChannelRowIdTextView);





    }

    @Override
    public void onClick(View v) {

        if (!mMultiSelector.tapSelection(this)) {
            Toast.makeText(context,CHANNELNAME.getText(),Toast.LENGTH_LONG).show();

            mSolvedCheckBox.toggle();


          selected.add(ID.toString());


            Log.d(""+selected , " : value of selected ");


        }




    }
}}
</code></pre>

<p>another class : </p>

<pre><code>public class ChannelsInformation {
    String id,channelName;
    boolean isSelected;
}
</code></pre>

<p>on myFragmentCLass : </p>

<pre><code>Fab.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {

        String data = "";
        List&lt;ChannelsInformation&gt; stList = ((ChannelsAdapter) channelsAdapter).data;

        for (int i = 0; i &lt; stList.size(); i++) {
            ChannelsInformation singleStudent = stList.get(i);
            if (singleStudent.isSelected) {

                data = data + "\n" + singleStudent.channelName;

            }

        }

        Toast.makeText(getActivity(),
            "Selected Students: \n" + data, Toast.LENGTH_LONG)
            .show();




    }
});
</code></pre>

<p>Well am trying this from past 4 hours , you can see that  I even tried <code>multiselector</code> its an library for created an <code>selectMode</code>  as same what we have on listView  , now I putted an checkBox in my View and trying to get theValue of checkBox of the checkBox if its checked then show the data but  am getting <code>null</code> in return  , if anybody's knows wrong here then please point it out it'll me so helpful for me and appreciated by me , thanks </p>