Skip to content Skip to sidebar Skip to footer

Change Value Of Listitem Onitemclick

I want to change the value of listItem when that listItem is clicked. I have provided the code below. public class MyListDialogExampleActivity extends Activity implements OnItemCli

Solution 1:

you need to use the parameters sent to you on the onItemClick , so that you take the i-th element in the array you've used , change its value , and in the end , notify the adapter that the data has changed by using notifyDatasetChanged.

Solution 2:

You can't change arrays during runtime

So you have to use List (http://developer.android.com/reference/java/util/List.html)

Post a Comment for "Change Value Of Listitem Onitemclick"