• 水滴效果的下拉刷新--第三方开源 开源--WaveSwipeRefreshLayout


    下载地址:https://github.com/recruit-lifestyle/WaveSwipeRefreshLayout

    直接把代码复制到你的项目于即可使用:

    使用:

    在xml中:

    <jp.co.recruit_lifestyle.android.widget.WaveSwipeRefreshLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:id="@+id/main_swipe">
    
          <ListView
              android:id="@+id/main_list"
              android:layout_width="match_parent"
              android:layout_height="match_parent"/>
    
    </jp.co.recruit_lifestyle.android.widget.WaveSwipeRefreshLayout>

    JAVA代码:

    mWaveSwipeRefreshLayout = (WaveSwipeRefreshLayout) findViewById(R.id.main_swipe);
    mWaveSwipeRefreshLayout.setOnRefreshListener(new WaveSwipeRefreshLayout.OnRefreshListener() {
      @Override public void onRefresh() {
        // Do work to refresh the list here.
        new Task().execute();
      }
    });
    
    private class Task extends AsyncTask<Void, Void, String[]> {
      ...
      @Override protected void onPostExecute(String[] result) {
        // Call setRefreshing(false) when the list has been refreshed.
        mWaveSwipeRefreshLayout.setRefreshing(false);
        super.onPostExecute(result);
      }
    }
  • 相关阅读:
    ajax 笔记
    EM Algorithm
    Support Vector Machine
    Factor Analysis
    Local weighted regression
    一点突发奇想
    纳什均衡
    自驾崇明东滩湿地
    程序员热力学第二定律
    SQL Server Identity 属性的问题
  • 原文地址:https://www.cnblogs.com/zzw1994/p/5146066.html
Copyright © 2020-2023  润新知