Android应用中怎么对本地pdf文件进行加载-创新互联

这篇文章给大家介绍Android应用中怎么对本地pdf文件进行加载,内容非常详细,感兴趣的小伙伴们可以参考借鉴,希望对大家能有所帮助。

创新互联主营靖州网站建设的网络公司,主营网站建设方案,重庆APP软件开发,靖州h5微信小程序定制开发搭建,靖州网站营销推广欢迎靖州等地区企业咨询

大部分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>

本文标题:Android应用中怎么对本地pdf文件进行加载-创新互联
浏览路径:https://www.cdcxhl.com/article22/phijc.html

成都网站建设公司_创新互联,为您提供面包屑导航外贸网站建设建站公司手机网站建设定制开发静态网站

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联

成都定制网站建设