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

熱點內容
黑配綠衣服圖片 瀏覽:228
個性高清圖片男生頭像圖片 瀏覽:861
女生給男生發櫻花圖片 瀏覽:464
身份證word圖片水印怎麼加 瀏覽:141
男生的棒球棒圖片大全 瀏覽:321
趙麗穎藍色衣服圖片霸氣 瀏覽:47
可愛一點的龍圖片 瀏覽:265
英文字體手寫體圖片 瀏覽:375
繪畫作品圖片大全簡單元旦 瀏覽:555
大喬怎麼畫圖片 瀏覽:301
大學女生哭泣圖片 瀏覽:133
印度路虎價格圖片 瀏覽:523
待嫁文字圖片 瀏覽:523
文件夾圖片怎麼排序 瀏覽:712
美麗公主畫圖片大全 瀏覽:220
純欲發型正面圖片 瀏覽:561
一個男生憂傷的圖片 瀏覽:288
二八分發型男生圖片 瀏覽:517
特警可愛圖片 瀏覽:251
歐美男生吐煙圖片 瀏覽:571