Note that there are some explanatory texts on larger screens.

plurals
  1. POPull to refresh example, Eclipse don't find setOnRefreshListener command
    primarykey
    data
    text
    <p>iam dealing with well known pull to refresh example from <a href="https://github.com/johannilsson/android-pulltorefresh" rel="nofollow">Git-hub</a></p> <p>I loaded library and everything is working as it should but when i want to call method setOnRereshListener, Eclipse don't find it. What could be a problem? </p> <p>This is code from example:</p> <pre><code> PullToRefreshListView pullToRefreshView = (PullToRefreshListView) findViewById(R.id.pull_to_refresh_listview); pullToRefreshView.setOnRefreshListener(new OnRefreshListener&lt;ListView&gt;() { @Override public void onRefresh(PullToRefreshBase&lt;ListView&gt; refreshView) { // Do work to refresh the list here. new GetDataTask().execute(); } }); </code></pre> <p>And this is my code:</p> <pre><code>public class MainActivity extends Activity { private static final String URL = "http://192.168.1.103/php-android/testphp.php"; private static final String TAG_DATA = "data"; private static final String TAG_ID = "name"; private static final String TAG_DATE = "date"; public PullToRefreshListView listView; JSONArray data = null; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder() .detectAll().penaltyLog().build(); StrictMode.setThreadPolicy(policy); getDataInArray(); PullToRefreshListView pullToRefreshView = (PullToRefreshListView) findViewById(R.id.pull_to_refresh_listview); pullToRefreshView.setOnRefreshListener(new OnRefreshListener&lt;ListView&gt;() { @Override public void onRefresh(PullToRefreshBase&lt;ListView&gt; refreshView) { // Do work to refresh the list here. new GetDataTask().execute(); } }); } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload