本文整理汇总了Java中com.artifex.mupdflib.CallbackApplication.MuPDFCallbackClass类的典型用法代码示例。如果您正苦于以下问题:Java MuPDFCallbackClass类的具体用法?Java MuPDFCallbackClass怎么用?Java MuPDFCallbackClass使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
MuPDFCallbackClass类属于com.artifex.mupdflib.CallbackApplication包,在下文中一共展示了MuPDFCallbackClass类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updatePageNumView
import com.artifex.mupdflib.CallbackApplication.MuPDFCallbackClass; //导入依赖的package包/类
@SuppressLint("DefaultLocale")
private void updatePageNumView(int index) {
if (core == null)
return;
String pageStr = "";
if (core.getDisplayPages() == 2 && index!=0 && index!=core.countPages()-1) {
pageStr = String.format("%1$d-%2$d", (index*2), (index*2)+1);
mPageNumberView.setText(String.format(getString(R.string.two_pages_of_count), (index*2), (index*2)+1, core.countSinglePages()));
}
else if (core.getDisplayPages() == 2 && index==0) {
pageStr = String.format("%1$d", index+1);
mPageNumberView.setText(String.format(getString(R.string.one_page_of_count), index+1, core.countSinglePages()));
}
else if (core.getDisplayPages() == 2 && index==core.countPages()-1) {
pageStr = String.format("%1$d", (index*2));
mPageNumberView.setText(String.format(getString(R.string.one_page_of_count), (index*2), core.countSinglePages()));
}
else {
pageStr = String.format("%1$d", index+1);
mPageNumberView.setText(String.format(getString(R.string.one_page_of_count), index+1, core.countPages()));
}
MuPDFCallbackClass.sendGaiView(String.format("documentView (%1$s), page (%2$s)", mDocName, pageStr));
}
示例2: OnMoreButtonClick
import com.artifex.mupdflib.CallbackApplication.MuPDFCallbackClass; //导入依赖的package包/类
public void OnMoreButtonClick(View v) {
if (core != null) {
int i = mDocView.getDisplayedViewIndex();
if (core.getDisplayPages() == 2) {
i = (i * 2) - 1;
}
PDFPreviewGridActivityData.get().core = core;
PDFPreviewGridActivityData.get().position = i;
//PDFPreviewGridActivity prevAct = new PDFPreviewGridActivity();
//Intent intent = prevAct.getIntent();
Intent intent = new Intent(MuPDFActivity.this, PDFPreviewGridActivity.class);
startActivityForResult(intent, PAGE_CHOICE_REQUEST);
MuPDFCallbackClass.sendGaiView(String.format("documentThumbView (%1$s)", mDocName));
}
/////////////mTopBarMode = TopBarMode.More;
/////////////mTopBarSwitcher.setDisplayedChild(mTopBarMode.ordinal());
}