Monday, February 24, 2014

How to modify the value of a particular item in the listview


I wrote a listview item that contains multiple images, and how can I change only one picture of an item other unchanged, assuming that I know of that item id. . PS: Click on the item was not changed, but through a value other parts of my program generated to determine whether to change the<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
If you click the future will get to a location information, and then get to that item in the layout and then get through the listview control and then change the information on the OK
Reply:
cited a floor shen332401890 reply:
If you click the future will get to a location information, and then get to that item's layout by listview control and then get that change information on the OK

How to get the layout listview ltem it by ID
Reply:
public abstract void onItemClick (AdapterView parent, View view, int position, long id)

Added in API level 1
Callback method to be invoked when an item in this AdapterView has been clicked.

Implementers can call getItemAtPosition (position) if they need to access the data associated with the selected item.

Parameters
parent The AdapterView where the click happened.
view The view within the AdapterView that was clicked (this will be a view provided by the adapter)
position The position of the view in the adapter.
id The row id of the item that was clicked.

This is the inside of the View that you need to layout layout.findViewById I Needless to say it
Reply:
This is wrong, click SORRY
Reply:
ListView.getItemAtPosition (position);
public Object getItemAtPosition (int position)

Added in API level 1
Gets the data associated with the specified position in the list.

Parameters
position Which data to get
Returns
The data associated with the specified position in the list

Ignore the two above please forgive me for the wrong answers
Reply:
references, 5th Floor shen332401890 reply:
ListView.getItemAtPosition (position);
public Object getItemAtPosition (int position)

Added in API level 1
Gets the data associated with the specified position in the list.

Parameters
position Which data to get
Returns
The data associated with the specified position in the list

Ignore the two above please forgive me for the wrong answers

For the return value of this function is what I should use to get the value of the object it
Reply:
reference to the 6th floor wjw2066616 reply:
Quote: references, 5th Floor shen332401890 reply:

ListView.getItemAtPosition (position);
public Object getItemAtPosition (int position)

Added in API level 1
Gets the data associated with the specified position in the list.

Parameters
position Which data to get
Returns
The data associated with the specified position in the list

Ignore the two above please forgive me for the wrong answers

For the return value of the function I should

object to get the value of what it
Your item corresponding layout
Reply:
reference to the 7th floor shen332401890 reply:
Quote: references to the 6th floor wjw2066616 reply:

Quote: references, 5th Floor shen332401890 reply:

ListView.getItemAtPosition (position);
public Object getItemAtPosition (int position)

Added in API level 1
Gets the data associated with the specified position in the list.

Parameters
position Which data to get
Returns
The data associated with the specified position in the list

Ignore the two above please forgive me for the wrong answers

For the return value of the function I should

object to get the value of what it

Your item corresponding layout

What can specifically point. For example, my item corresponding profile for A.XML, then I want to change one of the ImageView
Reply:
Object of your A.xml obtained here should be that this a.xml outermost ViewGroup
Reply:
reference to the 9th floor shen332401890 reply: object
your A.xml obtained here should be that this a.xml outermost ViewGroup
< / fieldset>
Well solved with a View object to accept enough. Thank you
Reply:
In it the landlord, you can put this code to give me a look at them, 469197334@qq.com, grateful

No comments:

Post a Comment