gesture-imageview
gesture-imageview copied to clipboard
A possible fix for dynamic image loading
Original version: protected void initImage() { if(this.drawable != null) { this.drawable.setAlpha(alpha); this.drawable.setFilterBitmap(true); if(colorFilter != null) { this.drawable.setColorFilter(colorFilter); } } if(!layout) { requestLayout(); redraw(); } } Fixed version: protected void initImage() { if(this.drawable != null) { this.drawable.setAlpha(alpha); this.drawable.setFilterBitmap(true); if(colorFilter != null) { this.drawable.setColorFilter(colorFilter); } } if(!layout) { requestLayout(); } else { drawable.setBounds(-hWidth,-hHeight,hWidth,hHeight); } redraw(); }