How to read images from drawable folder, not by R.drawable.[imageid]
来源:互联网 发布:linux就该这么学 知乎 编辑:程序博客网 时间:2024/06/05 01:17
public void getImageFoldes(String filepath){
File file = new File(filepath);
File[] files = file.listFiles();
for (int fileInList = 0; fileInList < files.length; fileInList++)
{
File filename;
filename =files[fileInList];
if(filename.isHidden()|| filename.toString().startsWith("."))
return;
if (files.length !=0){
//if File is the image file then store the album name
if ((files[fileInList].toString()).contains(".png")||
(files[fileInList].toString()).contains(".jpg")||
(files[fileInList].toString()).contains(".jpeg")){
Bitmap myBitmap = BitmapFactory.decodeFile(files[fileInList].getAbsolutePath()); // this is the image file path
}
}
}
}
File file = new File(filepath);
File[] files = file.listFiles();
for (int fileInList = 0; fileInList < files.length; fileInList++)
{
File filename;
filename =files[fileInList];
if(filename.isHidden()|| filename.toString().startsWith("."))
return;
if (files.length !=0){
//if File is the image file then store the album name
if ((files[fileInList].toString()).contains(".png")||
(files[fileInList].toString()).contains(".jpg")||
(files[fileInList].toString()).contains(".jpeg")){
Bitmap myBitmap = BitmapFactory.decodeFile(files[fileInList].getAbsolutePath()); // this is the image file path
}
}
}
}
- How to read images from drawable folder, not by R.drawable.[imageid]
- How can i specify the resource to get from R.res.drawable dynamically?
- How to read images to Symbian bitmap
- How to read images to Symbian bitmap
- How to read images to Symbian
- How to convert a Drawable to a Bitmap?
- How to share folder to windows from ubuntu with samba.
- android-R.drawable
- Drawable
- Drawable
- Drawable
- Drawable
- drawable
- Drawable
- Drawable
- Drawable
- Drawable
- Drawable
- java 学习网站
- Domino+Qucikplace+Sametime构建企业办公平台图文攻略(一)
- getChildren YI
- Domino+Qucikplace+Sametime构建企业办公平台图文攻略(二)
- getChren er
- How to read images from drawable folder, not by R.drawable.[imageid]
- getchren 3
- Domino+Qucikplace+Sametime构建企业办公平台图文攻略(三)
- Struts 2拦截器
- javascript
- SpringMVC 配置
- 如何在WPF中使用ActiveX
- pcap结构--pcap_t数据类型
- Servlet的应用---重定向和请求分配