public void loadMore2() { int i = next; if (dataItems.size() < fragmentdat2 .size()) { // Limit the number of items to 100 (stop loading when reaching 100 items) try { for (i = next; i < next + 10; i++) { dataItems.add(sortedData.get(i)); } } catch (Exception e) { Toast.makeText( DetailedDisplayActivity.this, "You have reach to last record", Toast.LENGTH_SHORT) .show(); tipsList.removeFooterView(footerView); } // Notify the ListView of data changed adapter.notifyDataSetChanged(); isLoading = false; // Update next next = i; } else { Toast.makeText( DetailedDisplayActivity.this, "You have reach to last record", Toast.LENGTH_SHORT) .show(); tipsList.removeFooterView(footerView); } }
public void run() { if (listrow != null && listrow.size() > 0) { // videolist_adapter.notifyDataSetChanged(); for (int k = 0; k < listrow.size(); k++) { mAdapter.addItem(listrow.get(k)); mAdapter.notifyDataSetChanged(); } // videolist_adapter.add(listrow.get(k)); } // mAdapter.notifyDataSetChanged(); m_ProgressDialog.dismiss(); }
public void run() { if (listrow != null && listrow.size() > 0) { // videolist_adapter.notifyDataSetChanged(); for (int k = 0; k < listrow.size(); k++) { mAdapter.addItem(listrow.get(k)); // mAdapter.notifyDataSetChanged(); } // videolist_adapter.add(listrow.get(k)); } mAdapter.notifyDataSetChanged(); m_ProgressDialog.dismiss(); for (int a = 0; a < listrow.size(); a++) { Log.e("Stutas, " + a, " " + listrow.get(a).getStatus()); } }