List 如何转换格式列表中的图像<;文件>;要位图吗?
请帮助我将列表文件转换为位图?在android java中。List 如何转换格式列表中的图像<;文件>;要位图吗?,list,image,file,bitmap,List,Image,File,Bitmap,请帮助我将列表文件转换为位图?在android java中。ArrayList bitmapArray=new ArrayList(); ArrayList<Bitmap> bitmapArray = new ArrayList<Bitmap>(); if(bitmapArray.size() > 0) { int index = bitmapArray.size() -1; Bitmap lastbitmap = bitmapArray.get(i
ArrayList bitmapArray=new ArrayList();
ArrayList<Bitmap> bitmapArray = new ArrayList<Bitmap>();
if(bitmapArray.size() > 0)
{
int index = bitmapArray.size() -1;
Bitmap lastbitmap = bitmapArray.get(index);
SubImageView.setImageBitmap(lastbitmap);
}
如果(bitmapArray.size()>0)
{
int index=bitmapArray.size()-1;
位图lastbitmap=bitmapArray.get(索引);
setImageBitmap(lastbitmap);
}
在函数中尝试此操作这是否回答了您的问题?但如何将列表转换为位图?
File saveBitmap;//图像文件字符串filePath=saveBitmap.getPath();位图位图=BitmapFactory.decodeFile(文件路径)代码>试试这个谢谢兄弟,我试过了。位图位图=解码文件(saveBitmap.get(0.getAbsolutePath());