Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

我用baserecyclerviewadapterhelper适配时,引用此控件,在6.0系统上 报ninegridview.GridImageView{c03dd20 V.ED..C.. ......ID 0,312-300,612} during layout: running second layout pass #23

Open
littlefreshbird opened this issue Aug 22, 2017 · 3 comments

Comments

@littlefreshbird
Copy link

public class HealthAdapter extends BaseQuickAdapter<HealthInfo, BaseViewHolder> {

public HealthAdapter(@LayoutRes int layoutResId, @Nullable ArrayList<HealthInfo> data) {
    super(layoutResId, data);
}
NineGridImageViewAdapter<String> mAdapter = new NineGridImageViewAdapter<String>() {
    @Override
    protected void onDisplayImage(Context context, ImageView imageView, String s) {
        Glide.with(mContext)
                .load(s)
                .placeholder(R.mipmap.load_logo)
                .error(R.mipmap.load_logo)
                .dontAnimate()
                .into(imageView);
    }

    @Override
    protected ImageView generateImageView(Context context) {
        return super.generateImageView(context);
    }

    @Override
    protected void onItemImageClick(Context context, ImageView imageView, int index, List<String> list) {

    }
};
@Override
protected void convert(BaseViewHolder helper, HealthInfo item) {


    List<String>  url=new ArrayList<>();
    url.add("http://ac-QYgvX1CC.clouddn.com/ad99de83e1e3f7d4.jpg");
    url.add("http://ac-QYgvX1CC.clouddn.com/ad99de83e1e3f7d4.jpg");
    url.add("http://ac-QYgvX1CC.clouddn.com/ad99de83e1e3f7d4.jpg");
    url.add("http://ac-QYgvX1CC.clouddn.com/ad99de83e1e3f7d4.jpg");
    TextView  tvTime=helper.getView(R.id.tv_time);
    TextView  tvKind=helper.getView(R.id.tv_kind);
    TextView  tvHospital=helper.getView(R.id.tv_hospital);
    NineGridImageView<String> mNglContent =helper.getView(R.id.ngl_images);

    mNglContent.setAdapter(mAdapter);
    mNglContent.setImagesData(url);
    String date=item.getPre_date().substring(0,10);
    tvTime.setText(date);
    tvKind.setText(item.getMedical_type().equals("0")?"11111":"22222");
    tvHospital.setText("机构:"+item.getOrg_name());


}
@JoviLam
Copy link

JoviLam commented Oct 10, 2017

请问你解决了吗?我的也无限打印during layout: running second layout pass

@DuShuYuan
Copy link

同问题,求解决办法

1 similar comment
@wzxlucky
Copy link

同问题,求解决办法

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants