Tag: recycler adapter

在recyclerview中滚动滚动背景颜色或图像?

我想知道当我向下或向上滚动时,我的图像和布局颜色都在洗牌,我使用recyclerview创建了cardview。 并设置一个图像(在点击时更改颜色,以便知道其用户最喜欢的项目)和setbackgroundcolor(随机chossen)到父布局,以使cardview吸引人。 但是当我滚动1.图像改变位置的图像,2。布局背景自动改变颜色。 我在这里发布我的适配器代码。 public class TOAdapter extends RecyclerView.Adapter { JSONArray jsonArray; private String title; private String image; private ImageLoader imageLoader; private String subtitle; private String subti; private Context context; private ImageView clip; public TOAdapter(JSONArray jsonArray) { this.jsonArray = jsonArray; } // Create new views (invoked by the layout manager) @Override public TOAdapter.ViewHolder onCreateViewHolder(final ViewGroup […]