I want to convert the (R.drawable.logo)object
to a string
and I want to show it in the listview
. I used the following code for it but it did not work
Bitmap bitmapOrg = BitmapFactory.decodeResource(getResources(), R.drawable.logo);
ByteArrayOutputStream ByteStream = new ByteArrayOutputStream();
bitmapOrg.compress(Bitmap.CompressFormat.PNG,100, ByteStream);
byte [] b = ByteStream.toByteArray();
String temp = Base64.encodeToString(b, Base64.DEFAULT);
ListAdapter adapter = new SimpleAdapter(
Welcome.this,
contactList,
R.layout.about,
new String[] { TAG_NAME, TAG_SURNAME, temp },
new int[] { R.id.name, R.id.surname, R.id.imageView}
);
list.setAdapter(adapter);
ERROR: Unable to decode stream: java.io.FileNotFoundException: : open failed: ENOENT (No such file or directory)