我想显示数据库中显示的.ppt文件,链接为https://www.tradeyourfunds.com/ExamPlans.Com/ppt_clip/SamplePPTFile_500kb.ppt,并且我已将pptViewer使用了“ itsrts-pptviewer.jar
”库。
所以我有两个疑问
1)当我单击链接时,ppt正在下载,但未显示,因此建议我如何显示ppt文件而不是下载它。
2)当我使用以下代码时
pptViewer = (PPTViewer) findViewById(R.id.pptviewer);
// Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);
// File f = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).getPath(), "/Phone Storage/Download/fashion.ppt");
// File f = FileUtils.fileFromAsset(MainActivity.this, "junit.ppt");
File file = new File(Environment.getExternalStorageDirectory().getPath()
+ "/Download/fashion.ppt");
path = file.getPath().toString();
if(file.exists()){
Log.e("file present",path);
}else{
Log.e("file not present",path);
}
pptViewer.setNext_img(R.drawable.next).setPrev_img(R.drawable.prev)
.setSettings_img(R.drawable.settings)
.setZoomin_img(R.drawable.zoomin)
.setZoomout_img(R.drawable.zoomout);
pptViewer.loadPPT(this, path);
}
为什么我无法获取显示正在加载的ppt。
任何帮助将不胜感激!