私はAndroid携帯のSDカードに複数のページングされたPDFを持っています。私は自分のアプリケーションから見たいと思っていますが、それを表示する方法はわかりません。アンドロイドのタッチスクロールでPDFを表示
すべてのjarファイルを画面に表示することができます。
私はAndroid携帯のSDカードに複数のページングされたPDFを持っています。私は自分のアプリケーションから見たいと思っていますが、それを表示する方法はわかりません。アンドロイドのタッチスクロールでPDFを表示
すべてのjarファイルを画面に表示することができます。
おそらく、PDFの表示をAdobe Readerなどの別のアプリケーションに渡すのが最善の方法です。私たちは、ユーザーが使用可能なPDFリーダーを持っていないシナリオを占めてもすべき
Intent i = new Intent(Intent.ACTION_VIEW);
File pdf = new File(FILE_LOCATION);
i.setDataAndType(Uri.fromFile(pdf), "application/pdf");
startActivity(i);
:テントを使用して
スクロールアクティビティを使用する方法
Intent i = new Intent(Intent.ACTION_VIEW);
File pdf = new File(FILE_LOCATION);
i.setDataAndType(Uri.fromFile(pdf), "application/pdf");
List<ResolveInfo> list = getPackageManager().queryIntentActivities(i,
PackageManager.MATCH_DEFAULT_ONLY);
if(!list.isEmpty()){
startActivity(i);
}else{
Toast.makeText(this, "A PDF reader is required to open this.", Toast.LENGTH_LONG).show();
}
First u install the acrobat reader in ur emulator and the u view ur pdf file in emulator. Download acrobat reader apk and install in emulator using this command from command line. 1. Go to start and open run. 2. type cmd and type "adb -e install FilePath" press enter. Then u go to ur application and write this code for viewing pdf in acrobat reader.
Intent i = new Intent(Intent.ACTION_VIEW);
File pdf = new File(<File name whit full path>);
i.setDataAndType(Uri.fromFile(pdf), "application/pdf");
startActivity(i);
PDFの次のページをインテントで表示するとき –
pdfビューのアクティビティを開始するとAcrobat Readerで表示されます。そのビューでは、ファイル内のすべてのページをスクロールして表示します。ファイルのすべてのページが開きます。 –