導航:首頁 > 圖片大全 > android如何調用圖片

android如何調用圖片

發布時間:2022-06-06 12:34:34

如何調用android的內置圖片

調用android的內置圖片的方法:
方法一
Java code
File file=new File("/sdcard/IMG/1.jpg");
Intent it =new Intent(Intent.ACTION_VIEW);
Uri mUri = Uri.parse("file://"+file.getPath());
it.setDataAndType(mUri, "image/*");
startActivity(it);
方法二
Java code
ComponentName componentName=new ComponentName("com.cooliris.media","com.cooliris.media.Gallery"); Intent intent=new Intent();
intent.setComponent(componentName);
File file=new File("/sdcard/IMG/1.jpg");
Uri mUri = Uri.parse("file://"+file.getPath());
intent.setData(mUri);
intent.setAction(Intent.ACTION_VIEW);
startActivity(intent);

Ⅱ Android studio中XML文件調用圖片,這樣有什麼問題格式嗎 還有就是Android

android:src="@" 你缺少了標識符號;肯定會報錯;

Ⅲ 安卓怎麼根據圖片路徑調用系統相冊查看這個圖片

//使用Intent
Intent intent = new Intent(Intent.ACTION_VIEW);
//Uri mUri = Uri.parse("file://" + picFile.getPath());Android3.0以後最好不要通過該方法,存在一些小Bug
intent.setDataAndType(Uri.fromFile(picFile), "image/*");
startActivity(intent);

Ⅳ android怎麼調用系統自帶的圖庫打開指定目錄的相冊

Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.setType("image/*");
startActivityForResult(intent, 1);
採納一下,謝謝

Ⅳ android項目掉用系統圖片、圖標。 怎麼把創建項目時的應用圖標調用出來。或者說那些圖標在哪裡。

如果你有Android的系統源碼,可以到如下目錄中去找Android系統所用的圖片文件.

framework部分的各種資源,包括圖標,drawable,字元串等等.Android系統多數的圖標都在這個目錄.
其中hdpi等後綴表示圖標的各種解析度,進去後一看便知.
frameworks/base/core/res/res/drawable-hdpi/
frameworks/base/core/res/res/drawable-mdpi/

frameworks/base/core/res/res/drawable-xdpi/

frameworks/base/core/res/res/...

SystemUI是系統的狀態欄和下拉通知欄,這里也有一部分圖標.
frameworks/base/packages/SystemUI/res/drawable-*

packages/apps存放各種系統應用,比如圖庫,設置,音樂播放器等.
在每個應用的res目錄下,也可以找到圖片資源.以圖庫為例:
packages/apps/Gallery2/res/drawable-*

Android系統中絕大多數圖片資源都在上面所提的三個地方.
SDK里是找不到圖標的,得到源碼中去找.

閱讀全文

與android如何調用圖片相關的資料

熱點內容
收留女孩子是圖片 瀏覽:719
動漫蝴蝶圖片唯美圖片 瀏覽:540
淘寶商家怎麼處理商品圖片 瀏覽:440
布櫃子衣櫃圖片及價格 瀏覽:805
女生手拿刀的霸氣動漫圖片 瀏覽:89
word怎麼把大量圖片有序的排版 瀏覽:360
word一張圖片復製成九張 瀏覽:396
小孩肖像圖片大全可愛 瀏覽:862
燙發發型圖片瓜子臉 瀏覽:748
如何下載圖片不花錢 瀏覽:78
幼兒做作業圖片配文字 瀏覽:314
歐美灰色頭像女生頭像圖片 瀏覽:17
藍天白雲男生背影圖片真實 瀏覽:148
國慶節簡單手抄報的圖片 瀏覽:542
建築圖片大全簡單 瀏覽:915
簡單畫手圖片大全 瀏覽:863
趣味畫畫大全圖片簡單 瀏覽:563
釘釘男生圖片 瀏覽:770
干凈圖片黑白女生 瀏覽:851
圖片復制到word顯示超大 瀏覽:171