difficulties facing with multiple selection in listview
I have a listview which have multiple selection..in each item there is a
textview saying "MORE".on clicking on that text view it shows the details
of product in next page..what i have done is this in listview's
onitemclicklistener pr_id = tx.getText().toString(); where "tx" is a text
view in list having product id and "pr_id" is the product id which i am
sending to next page through intent. `more.setOnClickListener(new
OnClickListener() {
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Intent i1 = new Intent(Product_List.this,
Product_View.class);
i1.putExtra("productid", pr_id);
Log.i("pid", pr_id);
startActivity(i1);
}
});`
everything works fine but problem is that since i have multiselection and
say user has selected 3items from listview in order of 1st,2nd,3rd and he
clicks on 1st item's "MoRE"..It should show the details of the 1st item
but since he has selected 3rd item at last the details are shown are of
the 3rd item..means the last selected item holds the view..How can i
overcome this problem????
No comments:
Post a Comment