首页 > 解决方案 > 回收站中的 CardView 图像在平板电脑上滚动时放大太多

问题描述

当用户执行搜索时,我有一个包含卡片的片段。卡片包含 3 张图片和文字。手机没有问题。在用户滚动之前,前几张卡片在平板电脑上看起来不错。新加载的卡片具有放大很多的图像。由于在滚动之前没有问题,我知道这一定与我的绑定有关

    public void bind(Model model) {
        mModel = model;
        Glide.with(mCtx).load(model.getImage1()).into(imageView1);
        Glide.with(mCtx).load(model.getImage2()).into(imageView2);
        Glide.with(mCtx).load(model.getImage3()).into(imageView3);

        textViewFirstName.setText(model.getFirstName());
        textViewLastName.setText(model.getLastName());
    }

但是我很困惑,因为滚动后图像在手机上看起来很好。请帮忙

标签: androidandroid-recyclerviewandroid-cardview

解决方案


解决了只需使用 Picasso 库而不是垃圾 Glide 库


推荐阅读