Hi i am trying to load some data from msql db using asynctaskloader .
int customerid=0;
public void loaddata(int custId) {
customerid = custid;
getLoaderManager().initLoader(0, null, this);
}
@Override public Loader<List<AppEntry>> onCreateLoader(int id, Bundle args) {
// This is called when a new Loader needs to be created. This
// sample only has one Loader with no arguments, so it is simple.
return new AppListLoader(getActivity(),customerid);
}
@Override public void onLoadFinished(Loader<List<AppEntry>> loader, List<AppEntry> data) {
// Set the new data in the adapter.
log.d("price of item",""+data);
}
@Override public void onLoaderReset(Loader<List<AppEntry>> loader) {
// Clear the data in the adapter.
}
i am calling the loaddata() method from an activity and passing different customer id each time ,but it only gives me old result what i passed first time. It is there something call notify adapter change as we have in other adapters.