getBmpfromSd
来源:互联网 发布:汉高百得美缝剂淘宝 编辑:程序博客网 时间:2024/06/16 01:37
public Bitmap getBmpfromSd(String savePath, String name) {
if (savePath.trim() == null || savePath.trim().length() == 0
|| name.trim() == null || name.trim().length() == 0)
return null;
String sName = strConvert(name);
File dir = new File(savePath);
File[] files = dir.listFiles();
if (files == null) {
return null;
}
Bitmap bitmap = null;
for (int i = 0; i < files.length; i++) {
if (files[i].getName().equals(sName)) {
bitmap = BitmapFactory.decodeFile(savePath + "/" + sName);
vBmp.add(bitmap);
break;
}
}
return bitmap;
}
if (savePath.trim() == null || savePath.trim().length() == 0
|| name.trim() == null || name.trim().length() == 0)
return null;
String sName = strConvert(name);
File dir = new File(savePath);
File[] files = dir.listFiles();
if (files == null) {
return null;
}
Bitmap bitmap = null;
for (int i = 0; i < files.length; i++) {
if (files[i].getName().equals(sName)) {
bitmap = BitmapFactory.decodeFile(savePath + "/" + sName);
vBmp.add(bitmap);
break;
}
}
return bitmap;
}
- getBmpfromSd
- 数组排序方法及C实现的总结
- Bitmap和Drawable相互转换方法
- Notification状态栏通知
- 四个人 “谁做的好事”,三个为说假话,一个说真话!
- Root :: AOAPC I: Beginning Algorithm Contests (Rujia Liu) :: Volume 0. Getting Started 488 -
- getBmpfromSd
- 桌面图标出现混乱,图标文件混乱无法显示怎么修复
- Android 内存优化测试
- 建立BW开发环境
- XML 和 Java 技术: 数据绑定的多种用法
- WorkXP全面改版,初步尝试企业应用社会化
- WSFISP软件开发经历
- java.sql.SQLException: Locale not recognized处理
- 图像处理相关的国际杂志与影响因子