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

熱點內容
分手後希望你過得好文字圖片 瀏覽:203
卷發剃什麼頭好看圖片男生 瀏覽:458
剪映如何把圖片中的字去掉 瀏覽:61
倔強文字圖片 瀏覽:684
word多張圖片環繞 瀏覽:834
簡單的對k圖片 瀏覽:525
狗身上噴葯怎麼噴寵物狗跳蚤圖片 瀏覽:31
萌萌白羊座女生圖片頭像 瀏覽:206
大鯢可愛圖片 瀏覽:144
超帥男生畫畫時的圖片 瀏覽:681
臘八大寒圖片加文字 瀏覽:139
鹿晗托衣服的圖片 瀏覽:849
超帥的奧特曼高清圖片 瀏覽:761
衣服排掛鉤圖片 瀏覽:765
群里怎麼讓全部家長都看到圖片 瀏覽:7
女孩用圖片向你暗示戒指 瀏覽:415
朋友圈微信文字與圖片怎樣轉發 瀏覽:303
手繪女孩圖片素材 瀏覽:7
女孩子過頭的圖片 瀏覽:919
寵物狗包床單可愛圖片 瀏覽:334