Universal-Image-Loader如何在ImageView中适配中心

时间:2014-07-18 10:29:08

标签: android universal-image-loader

从url加载imageview中的图像,图像显示scaletype fitcenter后几秒钟图像自动调整大小。

imageLoader.displayImage(url, ivSingleWallpaper, options,
            new ImageLoadingListener() {

                @Override
                public void onLoadingStarted(String imageUri, View view) {
                    // Utils.showProgress(getActivity());
                }

                @Override
                public void onLoadingFailed(String imageUri, View view,
                        FailReason failReason) {
                    // Utils.closeProgress();
                    // Utils.showToast(getActivity(),
                    // failReason.toString();
                }

                @Override
                public void onLoadingComplete(String imageUri, View view,
                        Bitmap loadedImage) {
                    // Utils.closeProgress();
                    ivSingleWallpaper.setScaleType(ScaleType.FIT_CENTER);
                }

                @Override
                public void onLoadingCancelled(String imageUri, View view) {
                    // Utils.closeProgress();
                }
            });

如何在imageview中设置fitcenter。

0 个答案:

没有答案
相关问题