use of com.se491.chef_ly.model.RecipeList in project chefly_android by chef-ly.
the class ListViewFragment method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
isLoading = new AtomicBoolean(false);
if (savedInstanceState != null) {
title = savedInstanceState.getString("title");
pageNum = savedInstanceState.getString("pageNum");
list = savedInstanceState.getParcelable(title);
searchText = savedInstanceState.getString("search");
} else {
if (getArguments() != null) {
title = getArguments().getString("title");
pageNum = getArguments().getString("pageNum");
searchText = getArguments().getString("search");
//list = getArguments().getParcelableArrayList("list");
}
if (list == null) {
list = new RecipeList();
}
}
Log.d(TAG + "/" + title, "results -> " + title + " " + pageNum);
}
use of com.se491.chef_ly.model.RecipeList in project chefly_android by chef-ly.
the class ListViewFragment method onLoadFinished.
// LoaderManager callback method
@Override
public void onLoadFinished(Loader<RecipeList> loader, RecipeList data) {
Log.d(TAG + "/" + title, "Loader - OnLoadFinish");
for (RecipeInformation recipe : data) {
list.add(recipe);
}
((BaseAdapter) listView.getAdapter()).notifyDataSetChanged();
isLoading.set(false);
Log.d(TAG, "Getting more recipes from server --- Done");
}
Aggregations