@Override
    public void loadFullScreenImage(final ImageView iv, String imageUrl, int width, final LinearLayout bgLinearLayout) {
        if (!TextUtils.isEmpty(imageUrl)) {
            Picasso.with(iv.getContext())
                    .load(imageUrl)
                    .resize(width, 0)
                    .into(iv, new Callback() {
                        @Override
                        public void onSuccess() {
                            Bitmap bitmap = ((BitmapDrawable) iv.getDrawable()).getBitmap();
                            Palette.from(bitmap).generate(new Palette.PaletteAsyncListener() {
                                public void onGenerated(Palette palette) {
                                    applyPalette(palette, bgLinearLayout);
                                }
                            });
                        }

                        @Override
                        public void onError() {

                        }
                    });
        } else {
            iv.setImageDrawable(null);
        }
    }
@ Override public void loadFullScreenImage ( final ImageView iv , String imageUrl , int width , final LinearLayout bgLinearLayout ) { if ( ! TextUtils . isEmpty ( imageUrl ) ) { Picasso . with ( iv . getContext ( ) ) . load ( imageUrl ) . resize ( width , 0 ) . into ( iv , new Callback ( ) { @ Override public void onSuccess ( ) { Bitmap bitmap = ( ( BitmapDrawable ) iv . getDrawable ( ) ) . getBitmap ( ) ; Palette . from ( bitmap ) . generate ( new Palette . PaletteAsyncListener ( ) { public void onGenerated ( Palette palette ) { applyPalette ( palette , bgLinearLayout ) ; } } ) ; } @ Override public void onError ( ) { } } ) ; } else { iv . setImageDrawable ( null ) ; } }
region FullScreenImageGalleryAdapter.FullScreenImageLoader