1. Check out our companion app, Forums for Android! Download from Google Play

android listview with loadmore button using xml parsing

Discussion in 'Application Development' started by krishnaveni, Nov 3, 2012.

  1. krishnaveni

    krishnaveni Well-Known Member
    Thread Starter
    55

    Dec 16, 2011
    158
    0
    55
    chennai
    I have developed one android application listview with loadmore button using xml parsing.

    I have followed this tutorial:Android ListView with Load More Button

    Here i have to implement one part:

    If my xml feed is empty means how can i hide the button on pervious page.please help me. I have wrote the below code means hide the button on empty page.but i wish to hide the button on lastpage(previous page of empty page).

    For Eg:

    Totally i have 4 pages.the 4 pages have feed values and 5th page have empty feed means i have to hide the button on 4th page.how can i do.please help me.

    Code (Text):
    1.  
    2.  
    3. if(nl.getLength() == 0 )
    4.         {
    5.             btnLoadMore.setVisibility(View.GONE);
    6.             pDialog.dismiss();
    7.         }
    8.  
    9.  
    This is my php code:
    How can i hide the button on last page.
     

    Advertisement

  2. Kirumbik

    Kirumbik New Member
    5

    Nov 24, 2012
    4
    0
    5
    First of all, it would be more clearly to understand your problem, if you post your java-code from android project here.
    Try to do this trick - put an attr with total feed elements to your <Feed> tag, so it would be <Feed total="N">.
    And then in your android app just track what page you've loaded and how much feed data is left
     

Share This Page

Loading...