RecyclerView layout corrupted after returning from a running activity

I am using the classic RecyclerView implementation with OnItemClickListener.

Relevant from adapter:

@Override
    public void onBindViewHolder(SmokesViewHolder smokesViewHolder, int i){
        String ci = smokeMapList.get(i);

        smokesViewHolder.vRowName.setText(ci);
        switch (ci) {
            case "de_dust2":
                Picasso.with(mContext).load(R.drawable.de_dust2).transform(new CircleTransform()).fit().centerCrop().into(smokesViewHolder.vRowImage);
                break;
...(more stuff here)
            default:
                Picasso.with(mContext).load(R.drawable.de_train).transform(new CircleTransform()).fit().centerCrop().into(smokesViewHolder.vRowImage);
                break;
        }

    }

      

Typically, it looks like this: imgur.com

However, one user reports a layout issue that looks like this

enter image description here

After clicking on any item in the list, opening a new activity and then going back to recycler. Any scrolling will fix this. (Ignore the other color scheme, the user is using the "night mode" theme). Reported phone and version "Moto G 2.gen 4g 5.0.2" however I can't reproduce the problem on my side (different phone) or emulator.

Does anyone know what might be causing this or how I can reproduce the problem?

+3


source to share


1 answer


I had the same problem. What I did was add bottom padding for reyclerview and make clipToPadding false. I know this is the wrong solution. But it worked for me.



    android:paddingBottom="50dp"
    android:clipToPadding="false"

      

0


source







All Articles