I have an api which has a field called "show\_in\_list" which is set to true or false. In my adapter for my recycler view I have done this 

```
public class EmoticonAdapter extends RecyclerView.Adapter<EmoticonAdapter.ViewHolder> {

private Context mContext;
private EmoticonResponse mEmoticon;
private Emoticons mEmoticons;

public class ViewHolder extends RecyclerView.ViewHolder {

    private ImageView mEmoticonButton;

    public ViewHolder(View v) {
        super(v);

        mEmoticonButton = (ImageView) v.findViewById(R.id.emoticonImages);
    }
}

public EmoticonAdapter(Context context, EmoticonResponse response) {
    mContext = context;
    mEmoticon = response;

    if (mEmoticon == null) {
        mEmoticon = new EmoticonResponse();
    }
}

@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
    View view;

    view = LayoutInflater.from(parent.getContext())
            .inflate(R.layout.grid_item_emoticon, parent, false);

    return new ViewHolder(view);
}

@Override
public void onBindViewHolder(ViewHolder holder, int position) {
    mEmoticons = mEmoticon.getItem(position);

    if (mEmoticons.getEmoticon().getUrl() != null) {
        if (mEmoticons.getEmoticon().getShow_in_list().equalsIgnoreCase("true")) {
            Picasso.with(mContext)
                    .load(mEmoticons.getEmoticon().getUrl())
                    .into(holder.mEmoticonButton);

            holder.mEmoticonButton.setVisibility(ImageView.VISIBLE);
            holder.mEmoticonButton.setClickable(true);
        }

    }

}

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

}

```

and my XML looks like this for the item in the RecyclerView

```
<ImageView
    android:id="@+id/emoticonImages"
    android:layout_width="40dp"
    android:layout_height="40dp"
    android:clickable="false"
    android:visibility="gone"/>

```

The issue I'm having is that when I load the view there are certain items that aren't visible but are causing large gaps in between the other items and you can still click on them.

[![enter image description here](https://i.stack.imgur.com/FzQNI.png)](https://i.stack.imgur.com/FzQNI.png)

What is it that I'm doing wrong? I'm doing everything textbook but I must be missing something right? 

**EDIT** Whole class has been added