android - problem with bitmap not displaying image after a text -
i trying show image directly under text had retrieved file in sdcard text showing not image, have been trying several methods non of workable below code display them //find directory sd card using api //*don't* hardcode "/sdcard" file sdcard = environment.getexternalstoragedirectory(); //get text file file file = new file(sdcard,"file.txt"); //read text file stringbuilder text = new stringbuilder(); try { bufferedreader br = new bufferedreader(new filereader(file)); string line; while ((line = br.readline()) != null) { text.append(line); text.append('\n'); } } catch (ioexception e) { //you'll need add proper error handling here } //find view id textview tv = (textview)findviewbyid(r.id.textview01); //set text tv.settext(text); bitmap bitmap = bitmapfactory.decoderesource(getresources(),r.drawable.icon); canv...