I have a ListView where I have some elements. Every item has one ListViewand two TextBoxes. Here is my question: When I clock on element from the list a new activity starts, where I have one ListView and two TextBoxes. How I can do this if I click first element in the new activity in ListView will be ListViewfrom this item and in TextBoxeswill be data from TextBoxes from the list.
I have a ListView where I have some elements. Every item has one ListView
Share
You can pass
extrasto theIntentyou use when starting the new Activity.Let’s say your current activity is
MyActivity, and the one you want to start by clicking on a list item isMyNewActivity; Then in yourMyActivityclass, inside the list item click listener should be modified as:and in your
MyNewActivityclass’onCreatemethod you are able to retrieve the passed extras, and fill the proper fields with the correct values:the
images,headersandtextsarrays -I suppose- contain the resource ids for the images and strings you want to display. They are probably accessible via the data of your current item’s renderer.