導航:首頁 > 圖片大全 > 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如何調用圖片相關的資料

熱點內容
動態圖片中閃動的文字怎樣製作 瀏覽:622
手機word文檔如何導出圖片 瀏覽:197
流行頭發型圖片大全 瀏覽:401
復制圖片顯示不完整怎麼弄 瀏覽:714
女生母乳發育圖片 瀏覽:666
word上的表格如何復制粘貼成圖片 瀏覽:530
漫畫小女孩圖片可愛萌 瀏覽:499
框簡單漂亮圖片 瀏覽:554
虎字怎麼寫好看圖片 瀏覽:676
紅燈籠圖片簡單 瀏覽:29
procreate插入圖片圖片怎麼導出 瀏覽:389
漂亮女孩畫畫圖片唯美 瀏覽:523
時尚個性女生圖片 瀏覽:759
動漫人物意境圖片 瀏覽:120
宋朝的衣服圖片 瀏覽:11
綠葉美女古風圖片 瀏覽:89
可憐至極的男生圖片 瀏覽:792
男生哭的傷感真人圖片 瀏覽:587
耐克t恤男短袖圖片價格 瀏覽:554
女生身體結構圖片 瀏覽:977