赞
踩
我只是用PdfViewer.jar(用蓝色按钮下载)并编写如下代码。
First.java@Overridepublic void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
File images = Environment.getExternalStorageDirectory();
imagelist = images.listFiles(new FilenameFilter()
{
public boolean accept(File dir, String name)
{
return ((name.endsWith(".pdf")));
}
});
pdflist = new String[imagelist.length];
for(int i = 0;i
{
pdflist[i] = imagelist[i].getName();
}
this.setListAdapter(new ArrayAdapter(this,android.R.layout.simple_list_item_1, pdflist));}@Overrideprotected void onListItemClick(ListView l, View v, int position, long id) {
super.onListItemClick(l, v, position, id);
String path = imagelist[(int)id]
赞
踩
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。