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:
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:
Although it is the same textview, but not the same for each postion, when clicked data.get (positon) setState ("new state");.
Then notifyDataChanged ();
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment