0

I have a dynamic customized listview with image and text content from live server. Now i want to send selected text and image to another activity. i am able to send text but not able to send image in that.

here is my code lines.for send text.. but i m not able to send image.

list.setOnItemClickListener(new OnItemClickListener() {
    @Override
    public void onItemClick(AdapterView<?> parent, View view,
                int position, long id) {

        HashMap<String, String> song = new HashMap<String, String>();
        exe= exeList.get(position);

        title=exe.get(Mainactivity.E_TITLE);
        text=exe.get(Mainactivity.E_TEXT);
        img=exe.get(Mainactivity.E_IMG);

        Intent i1= new Intent(Mainactivity.this,New_ListActivity.class);

        i1.putExtra("one",title);
        i1.putExtra("two",text);
        i1.putExtra("three", img);

        startActivity(i1);
    }
}
OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
JnT
  • 21
  • 8
  • 1
    What type of object is `img`? And how are you getting it out of the intent on the other Activity? – OneCricketeer Sep 04 '16 at 14:51
  • I think your solution is here! http://stackoverflow.com/questions/11519691/passing-image-from-one-activity-another-activity – JGPhilip Sep 04 '16 at 14:56
  • please provide full code also is the image loaded and cached ? – Hala.M Sep 04 '16 at 14:56
  • Hello, Image is come from server database. and its any .jpg, .png. I pass title, text with upper describe code. but not able to pass image with img=exe.get(Mainactivity.E_IMG);.i1.putExtra("three", img); – JnT Sep 05 '16 at 05:39

0 Answers0