I have an application on the market with an error that I cannot solve. Today I tracked it to the next method.
public void updateDealList(ArrayList<Deal> deals) {
if (dealListAdapter == null || showingBookmarks || !dealListAdapter.moreDealsToDownload()) {
dealListAdapter = new EndlessDealListAdapter(getActivity(),
R.layout.deal_list_item, deals);
setListAdapter(dealListAdapter);
listView = getListView();
if (getActivity().findViewById(R.id.right_fragment_container)!=null){
listView.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
listView.setVerticalScrollbarPosition(View.SCROLLBAR_POSITION_LEFT);
}
showingBookmarks=false;
Log.d("UPDATE_DEAL_LIST", "Notified list created new" + dealListAdapter.getCount());
return;
}
dealListAdapter.getDealListAdapter().clear();
for (Deal d: deals){
dealListAdapter.getDealListAdapter().add(d);
Log.d("UPDATE_DEAL_LIST", "added " + d.title);
}
dealListAdapter.notifyDataSetChanged();
Log.d("UPDATE_DEAL_LIST", "Notified list " + dealListAdapter.getCount());
}
This method is passed to arraylist transaction objects that are pulled from the Internet. When the application is open, data is retrieved from the Internet, and the above method is called, which creates a new adapter that is set for ListFragment. This method is also called when the user requests more transactions.
, , , , , . , , , , ( , RAM). , dealListAdapter null, . , , , .
, , if 21 . , .
05-23 01:52:32.879: D/UPDATE_DEAL_LIST(3478): Notified list created new21