How to insert data into custom list after paginition
<p>In the following code, after pagination data is stored into database but when I fetch new data from database then custom list is not showing any data, but if I go to next tab and come back it start showing data (note: new data from database successfully fetched only custom list is not generated ), is there any thing that I am missing?</p>

<p>Below is code snippet</p>

<pre><code> private void getFeedsData() {
        // TODO Auto-generated method stub

        VictoriesDBAdapter mFeedsDBAdapter = new VictoriesDBAdapter(this,
                Constants.strFeedsTableName);

        try {
            // //////getting all Feeds Data from API into response
            mAppStatus = AppStatus.getInstance(this);
            List&lt;NameValuePair&gt; params = new ArrayList&lt;NameValuePair&gt;(2);
            params.add(new BasicNameValuePair(Constants.AUTH_KEY, mAppStatus
                    .getSharedStringValue(Constants.AUTH_KEY)));
            String pageNumber = new Integer(iPageNo).toString();
            params.add(new BasicNameValuePair("PAGE_NO", pageNumber));
            String strJsonReponse = RestClient.getInstance(this).doApiCall(
                    Constants.strFeedsTab, "GET", params);
            Log.i("Feeds Data Response...######",
                    String.valueOf(strJsonReponse));

            // Fetching web service Response
            // String strJsonReponse =
            // "[{\"title\":\"Invitation through Email\",\"user\":{\"email\":\"as@as.com\"},\"created_at\":\"2012-04-09T05:53:31Z\",\"id\":43},{\"title\":\"Sample Victory\",\"user\":{\"email\":\"mahesh@yopmail.com\"},\"created_at\":\"2012-04-10T15:56:32Z\",\"id\":49}]";
            // Log.i("JSON RESONSE.....####", strJsonReponse);
            if (isNewFlag == true)
                mFeedsDBAdapter.deleteAll();
            if (strJsonReponse.equals("[]")) {
                bIsLastPage = true;
                Log.i("emtryyyyyyyyyy", "NULL");
                generateCustomList();
            } else {

                ParseResult parser = new ParseResult();
                ArrayList&lt;VictoriesDataModel&gt; victoriesArray = parser
                        .parseVictoriesData(strJsonReponse, isPostedByFlag);
                dbFunctions.storeFeedsDataInDB(victoriesArray);


            }
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

    }


private void generateCustomList() {
        // TODO Auto-generated method stub
        VictoriesDBAdapter mFeedsDBAdapter = new VictoriesDBAdapter(
                FeedsActivity.this, Constants.strFeedsTableName);
    //  VictoriesDataModel mVictoriesDataModel = new VictoriesDataModel();
        ArrayList&lt;VictoriesDataModel&gt; victoriesData = mFeedsDBAdapter
                .getVictoriesList(0, FeedsActivity.this);
        listCustomListViewId.setAdapter(new FeedsListAdapter(
                FeedsActivity.this, victoriesData)); // display data into custom
                                                        // list
         listCustomListViewId.setOnScrollListener(new OnScrollListener() {

         @Override
         public void onScrollStateChanged(AbsListView view, int scrollState) {
         // TODO Auto-generated method stub

         }

         @Override
         public void onScroll(AbsListView view, int firstVisibleItem,
         int visibleItemCount, int totalItemCount) {
         // TODO Auto-generated method stub
         int lastInScreen = firstVisibleItem + visibleItemCount;
         // is the bottom item visible &amp; not loading more already ? Load
         // more !
         Log.i("Endless List", "########firstVisibleItem"
         + firstVisibleItem);
         Log.i("Endless List", "########visibleItemCount"
         + visibleItemCount);
         Log.i("Endless List", "########last in screen" + lastInScreen);
         Log.i("Endless List", "########total Item" + totalItemCount);
         if ((totalItemCount != 0) &amp;&amp; (lastInScreen == totalItemCount)
         &amp;&amp; !(loadingMore)) {
         Log.i("Endless List", "########getting 10 more List items");

         if (!bIsLastPage) {
         // FeedsActivity.this.showDialog(0);
         iPageNo++;
         Log.i("Page No.....", String.valueOf(iPageNo));
         loadingMore = true;
         isNewFlag = false;
         getFeedsData();
         Log.i("control......", "At POssssssss");
         loadingMore = false;

         }
         }

         }
         });
    }
</code></pre>
