我想在WebView中打开本地(SD卡)PDF文件.
我已经尝试过了:
webview = (WebView) findViewById(R.id.webview);
webview.getSettings().setJavaScriptEnabled(true);
webview.getSettings().setPluginsEnabled(true);
webview.getSettings().setAllowFileAccess(true);
File file = new File(Environment.getExternalStorageDirectory() + "/test.pdf");
final Uri uri = Uri.fromFile(file);
webview.loadUrl(uri.toString());
Run Code Online (Sandbox Code Playgroud)
但它仍然没有打开它,所以让我知道如何在WebView中打开PDF?
我使用阿拉伯语文本,所以我想从右到左书写文字,这样我怎么能在android中写出从右到左的文字?
问候,Girish