gpt4 book ai didi

android - 如何为pdf文件分页 curl

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:12:44 24 4
gpt4 key购买 nike

嗨,我是 android page curl 应用程序中的新手,我通过 mupdf 开源显示 pdf 文件。这里使用 Intent 操作 View ,所以只有滚动有效,但我需要页面 curl 。如果有人知道答案,请帮助这个概念。谢谢。

@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);

mAlertBuilder = new AlertDialog.Builder(this);

if (core == null) {
core = (MuPDFCore)getLastNonConfigurationInstance();

if (savedInstanceState != null && savedInstanceState.containsKey("FileName")) {
mFileName = savedInstanceState.getString("FileName");
}
}
if (core == null) {
Intent intent = getIntent();
if (Intent.ACTION_VIEW.equals(intent.getAction())) {
Uri uri = intent.getData();
if (uri.toString().startsWith("content://media/external/file")) {
// Handle view requests from the Transformer Prime's file manager
// Hopefully other file managers will use this same scheme, if not
// using explicit paths.
Cursor cursor = getContentResolver().query(uri, new String[]{"_data"}, null, null, null);
if (cursor.moveToFirst()) {
uri = Uri.parse(cursor.getString(0));
}
}
core = openFile(Uri.decode(uri.getEncodedPath()));
}
if (core != null && core.needsPassword()) {
requestPassword(savedInstanceState);
return;
}
}
if (core == null)
{
AlertDialog alert = mAlertBuilder.create();
alert.setTitle(R.string.open_failed);
alert.setButton(AlertDialog.BUTTON_POSITIVE, "Dismiss",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
finish();
}
});
alert.show();
return;
}

createUI(savedInstanceState);
}

最佳答案

从这里获取代码 android_page_curllink

关于android - 如何为pdf文件分页 curl ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10663158/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com