Open humanheima opened 6 years ago
final View contentView = inflater.inflate(R.layout.fragment_preview, container, false); final ImageView imageView = contentView.findViewById(R.id.image); final PhotoViewAttacher mAttacher = new PhotoViewAttacher(imageView); // TODO: 2018/2/8 0008 不明白为什么要这样写 Glide.with(this) .asBitmap() .load(new File(strUrl)) .into(new SimpleTarget<Bitmap>(480, 800) { @Override public void onResourceReady(@NonNull Bitmap resource, @Nullable Transition<? super Bitmap> transition) { imageView.setImageBitmap(resource); mAttacher.update(); } }); return contentView;