如何显示progresslerView之类的进度条

时间:2015-05-09 10:38:24

标签: android

我正在寻找一种方法来显示下面的进度条(我刚刚在recyclerView中看到)

enter image description here

1 个答案:

答案 0 :(得分:1)

请检查一下它是否可以解决您的问题

android.support.v4.widget.SwipeRefreshLayout
        android:id="@+id/swipe_refresh_layout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        // put your layout here

    </android.support.v4.widget.SwipeRefreshLayout>

活动代码将是

SwipeRefreshLayout mSwipeRefreshLayout = (SwipeRefreshLayout) findViewById(R.id.swipe_refresh_layout);
mSwipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
      @Override
      public void onRefresh() {
            refreshContent();
          ...
  }