这篇文章给大家介绍Android应用中怎么对本地pdf文件进行加载,内容非常详细,感兴趣的小伙伴们可以参考借鉴,希望对大家能有所帮助。大部分app打开pdf文件是通过intent调起手机中能打开pdf文件的工具,来查看pdf文件,如果需求是
这篇文章给大家介绍Android应用中怎么对本地pdf文件进行加载,内容非常详细,感兴趣的小伙伴们可以参考借鉴,希望对大家能有所帮助。
大部分app打开pdf文件是通过intent调起手机中能打开pdf文件的工具,来查看pdf文件,如果需求是,用户在app内下载好pdf文件后,不通过第三方的工具,本地打开。
使用起来也很简单,首先添加PDFView的引用
compile 'com.GitHub.barteksc:android-pdf-viewer:2.4.0'
布局中引用PdfView
<LinearLayout xmlns:android="Http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <include layout="@layout/common_title" /> <com.github.barteksc.pdfviewer.PDFView android:id="@+id/pdf_view" android:layout_width="match_parent" android:layout_height="match_parent" /></LinearLayout>
--结束END--
本文标题: Android应用中怎么对本地pdf文件进行加载
本文链接: https://www.lsjlt.com/news/223568.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-05-05
2024-05-05
2024-05-05
2024-05-05
2024-05-05
2024-05-05
2024-05-05
2024-05-05
2024-05-05
2024-05-05
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0