Click here to Skip to main content
15,891,938 members
Please Sign up or sign in to vote.
0.00/5 (No votes)


Hope You Are Fine Well am stuck in a little bit of problem...I have a main activity in which i am using custom listview(showing movie_poster,movie_name,movie_rating)...and i want that if i click on a row a new activity should be open and jpeg image (movie_poster)in that row should be show in other activity...i tried a lot of things but could not find a solution..

What I have tried:

listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView Intent intent=new

Intent(MainActivity.this,Description_Activity.class);

int index= (int)parent.getItemIdAtPosition(position);

String description=movie_descriptions[index];

intent.putExtra("title",movie_titles[index]);
intent.putExtra("rating",movie_ratings[index]);
intent.putExtra("desc", description);


startActivity(intent);

}
});
Posted
Comments
priyanshbhaliya 15-Jul-16 22:49pm    
what Problem or error you got in code??

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900