Search code examples
androidandroid-datepicker

How to use Date Picker and update the date value inside the array adapter in android


I have checkable listview in my app which displays person name and date, when I click list items, it will expand the view below the list item.

In that view I have seekbar and texview for age and date picker, now if I click on textview a datepicker dialog is opening.

My issue is I want to set the date to the textview after clicking the 'Set' button in the datepicker dialog and also I want to update this date value to my list item also.


Solution

  • Change the value within the data source that backs your ListView, then call notifyDataSetChanged() on your ListAdapter.