本文整理汇总了Java中com.github.barteksc.pdfviewer.listener.OnPageChangeListener类的典型用法代码示例。如果您正苦于以下问题:Java OnPageChangeListener类的具体用法?Java OnPageChangeListener怎么用?Java OnPageChangeListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
OnPageChangeListener类属于com.github.barteksc.pdfviewer.listener包,在下文中一共展示了OnPageChangeListener类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: loadContent
import com.github.barteksc.pdfviewer.listener.OnPageChangeListener; //导入依赖的package包/类
protected void loadContent(String filePath, String extension, final LoadContentListener loadContentListener) {
titleName = titleBar.getTitleTextView().getText().toString();
if (titleName == null) {
titleName = "";
}
File file = new File(filePath);
pdfView.fromFile(file).defaultPage(0).enableSwipe(true).swipeHorizontal(false).enableDoubletap(true)
.enableAnnotationRendering(false).password(null).scrollHandle(null)
.onLoad(new OnLoadCompleteListener() {
public void loadComplete(int nbPages) {
loadContentListener.onLoadFinished(true);
}
})
.onPageChange(new OnPageChangeListener() {
public void onPageChanged(int page, int pageCount) {
titleBar.setTitle(titleName + "(" + (page + 1) + "/" + pageCount + ")");
}
})
.onError(new OnErrorListener() {
public void onError(Throwable t) {
loadContentListener.onLoadFinished(false);
t.printStackTrace();
}
}).load();
}
示例2: setOnPageChangeListener
import com.github.barteksc.pdfviewer.listener.OnPageChangeListener; //导入依赖的package包/类
private void setOnPageChangeListener(OnPageChangeListener onPageChangeListener) {
this.onPageChangeListener = onPageChangeListener;
}
示例3: getOnPageChangeListener
import com.github.barteksc.pdfviewer.listener.OnPageChangeListener; //导入依赖的package包/类
OnPageChangeListener getOnPageChangeListener() {
return this.onPageChangeListener;
}
示例4: onPageChange
import com.github.barteksc.pdfviewer.listener.OnPageChangeListener; //导入依赖的package包/类
public Configurator onPageChange(OnPageChangeListener onPageChangeListener) {
this.onPageChangeListener = onPageChangeListener;
return this;
}