Open miladheydari opened 8 years ago
hi i use your blurry .... but part of list not blurred it's my code ... i would items>=2 blurred but some one not blurred
final View finalConvertView = convertView; final ViewHolder finalHolder = holder; if (pos >= 2) { finalConvertView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() { @Override public void onGlobalLayout() { finalHolder.blurView.setVisibility(View.GONE); Blurry.with(context) .radius(3) .sampling(3) .capture(finalConvertView) .into(finalHolder.blurView); finalHolder.blurView.setVisibility(View.VISIBLE); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { finalConvertView.getViewTreeObserver().removeOnGlobalLayoutListener(this); } else { finalConvertView.getViewTreeObserver().removeGlobalOnLayoutListener(this); } } }); } else { finalHolder.blurView.setVisibility(View.GONE); finalHolder.blurView.setImageBitmap(null); }
Remember that you're using an Adapter by ListView, all the items are going to be recycled, maybe that would be the problem
hi i use your blurry .... but part of list not blurred it's my code ... i would items>=2 blurred but some one not blurred