Wednesday, March 5, 2014

Help: How to dynamically modify the value of each Item of ListVIew


Load item by Listview do something similar to store per-click "BUY" button will update the prices, but the price of each Item Textview all share an ID, how to update the textview it? (I've been through with settag () and gettag () button to set a different response for each.)<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
Do not use the ListView control this,
Instead ScrollView + layout Item themselves can implement a ListView control properties of each Item.

Reply:
arg0 is not the textview id?
Reply:
cited a floor birdsaction reply:
that do not use the ListView control,
Instead ScrollView + layout Item themselves can implement a ListView control properties of each Item.

Before I wrote, but then I changed the xml file too long before this, there is no other way to do it
Reply:
getView () {
covertView.setOnClickListener (new OnClickListener () {
void onClick () {

}
});
}

The purpose is to deal with some things clicked.




Reply:
cited landlord sparkroc reply:
Listview loaded item by doing something similar to store per-click "BUY" button will update the prices, but Each Item prices Textview all share an ID, how to update the textview it? (I've been through with settag () and gettag () for each button to set a different response.)


Although it is the same textview, but not the same for each postion, when clicked data.get (positon) setState ("new state");.
Then notifyDataChanged ();

No comments:

Post a Comment