panpf / sketch

Sketch is an image loading library designed for Compose Multiplatform and Android View. It is powerful and rich in functions. In addition to basic functions, it also supports GIF, SVG, video thumbnails, Exif Orientation, etc.
Apache License 2.0
2.05k stars 309 forks source link

按照文档无法使用阅读模式和缩放等功能,无法解析方法 #66

Closed GIS-PuppetMaster closed 6 years ago

GIS-PuppetMaster commented 6 years ago

package com.example.zkx74;

import android.content.Context; import android.net.Uri; import android.os.Bundle; import android.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup;

import me.panpf.sketch.SketchImageView; import me.panpf.sketch.zoom.ImageZoomer;

public class FragmentOfBus extends Fragment { SketchImageView sketchImageView; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment View view=inflater.inflate(R.layout.fragment_fragment_of_bus,container,false); SketchImageView sketchImageView = (SketchImageView)view.findViewById(R.id.image1); String assetResName = "calendar.jpg"; sketchImageView.displayAssetImage(assetResName); sketchImageView.setZoomEnabled(true); // 开启阅读模式 sketchImageView.getImageZoomer().setReadMode(true); return view; }

} //这是在一个fragment里写的,开启阅读模式下面的getImageZoomer()被提示无法解析方法

panpf commented 6 years ago

已更新文档 https://github.com/panpf/sketch/blob/master/docs/wiki/zoom.md