RecyclerView Glide加载图片刷新时会闪一下

@Override
    protected void convert(BaseViewHolder helper, GameListResp.Data data) {
 
        LinearLayout ic_linearLayout = (LinearLayout)helper.getView(R.id.ic_linearLayout);
        ViewGroup.LayoutParams params = ic_linearLayout.getLayoutParams();
        params.height = UIUtils.getWidth()/16*9;
        ic_linearLayout.setLayoutParams(params);

        GlideApp.with(mContext).load(data.getImageUrl())..into((ImageView) helper.getView(R.id.ic_image));

    }
 
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/ic_linearLayout"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical">

    

    

你可能感兴趣的:(Android,开发)