打開相冊
/*Intent i = new Intent(Intent.ACTION_PICK,android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
((Activity) getContext()).startActivityForResult(i,RESULT_LOAD_IMAGE);*/
Intent intent = new Intent("android.intent.action.PICK");
intent.setType("image/*");
((Activity)getContext()).startActivityForResult(Intent.createChooser(intent, "選擇圖片"), RESULT_LOAD_IMAGE);
//解決“相冊小祕書”無法點擊的問題
/*Intent intent = new Intent();
intent.addCategory(Intent.CATEGORY_OPENABLE);
intent.setType("image/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
((Activity)getContext()).startActivityForResult(Intent.createChooser(intent, "選擇圖片"), RESULT_LOAD_IMAGE);
*/
/*Intent i = new Intent(
Intent.ACTION_PICK,
android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
i.setType("image/*");
((Activity) getContext()).startActivityForResult(i,
RESULT_LOAD_IMAGE);
*/
((Activity) getContext()).startActivityForResult(i,RESULT_LOAD_IMAGE);*/
Intent intent = new Intent("android.intent.action.PICK");
intent.setType("image/*");
((Activity)getContext()).startActivityForResult(Intent.createChooser(intent, "選擇圖片"), RESULT_LOAD_IMAGE);
//解決“相冊小祕書”無法點擊的問題
/*Intent intent = new Intent();
intent.addCategory(Intent.CATEGORY_OPENABLE);
intent.setType("image/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
((Activity)getContext()).startActivityForResult(Intent.createChooser(intent, "選擇圖片"), RESULT_LOAD_IMAGE);
*/
/*Intent i = new Intent(
Intent.ACTION_PICK,
android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
i.setType("image/*");
((Activity) getContext()).startActivityForResult(i,
RESULT_LOAD_IMAGE);
*/
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.