Problems with android-pulltorefresh widgets

It’s a little difficult for me to implement the android-pulltorefresh widget from Johan Nilsson, found at https://github.com/johannilsson/android-pulltorefresh

The problem that I encountered is that after adding the user list to my application everything is fine, but it asks to click "Update", but I need it to be configured to update it.

The code I use below is heavily dependent on the github page, and a screenshot of the application can be found below, demonstrate my problem:

PullToRefreshListView lv = (PullToRefreshListView)findViewById(R.id.listView);
lv.setOnRefreshListener(new OnRefreshListener() {
    public void onRefresh() {
    // Do work to refresh the list here.
    GetData getData = new GetData();
    getData.execute();
}

enter image description here

I need to click Refresh to update the title, and it will only be shown after dragging the list. I feel that I just need to change some kind of flag, but I cannot find where it will be.

+5
2

, . , "Pull to Refresh" , , . , , , , , () ", ".

: kludge, , , , .

+1

code

, .

0

All Articles