這下面的代碼是從設備中挑選圖像。如何從設備中選擇PDF,以及如何在圖像視圖中顯示PDF?如何在圖像視圖android中顯示pdf?
bt_gall .setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent();
// Show only images, no videos or anything else
intent.setType("image/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
// Always show the chooser (if there are multiple options available)
startActivityForResult(Intent.createChooser(intent, "Select Picture"), PICK_IMAGE_REQUEST);
alertDialog.dismiss();
}
});
'ImageView'不支持打印pdf – snachmsm
'pdf'文件是**不是圖像**。 –