By using getImage()
I get the name of the file which is in assets/images folder, But I don't know how to create a bitmap. I cannot use getResorces()
, because the class is not an Activity
.
How can I create a bitmap having the name of the file stored in a string?
public class ListAdapter extends BaseAdapter {
...
...
....
private Bitmap getImage(Node node){
String path = node.getFirstChild().getFirstChild().getNextSibling().getNextSibling().getNextSibling().getTextContent();
}
}