Closed drparasmehta closed 7 years ago
In your DateLabelAdapter implementation, you return empty string (or null should be ok too) if you don't have the data yet, if you do, return the data.
Once you get your result from your server, just call
getTimelineView().notifyDatasetChanged();
(or itemChanged if you have a precise position) on your DatePickerTimeline instance.
notifyDatasetChanged > onBindView > internally call DateLabelAdapter to get label > update view :)
Close ticket if everything is good :)
Perfect man. The only correction is that, I had to use..
getTimelineView().getAdapter().notifyDataSetChanged();
Suppose I want to fetch labels from server upon selection of date. And then reflect the fetched data as label. (Label means the text shown below date, which is supplied by DateLabelAdapter as per your sample).
How do I do it? How do I refresh labels with data fetched from server.