android.support.v4.widget.SwipeRefreshLayout.setVisibility()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(6.4k)|赞(0)|评价(0)|浏览(155)

本文整理了Java中android.support.v4.widget.SwipeRefreshLayout.setVisibility()方法的一些代码示例,展示了SwipeRefreshLayout.setVisibility()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SwipeRefreshLayout.setVisibility()方法的具体详情如下:
包路径:android.support.v4.widget.SwipeRefreshLayout
类名称:SwipeRefreshLayout
方法名:setVisibility

SwipeRefreshLayout.setVisibility介绍

暂无

代码示例

代码示例来源:origin: north2016/T-MVP

@Override
public void setEmpty() {
  if ((!isHasHeadView || isReverse && !isHasFootView) && !isEmpty) {
    isEmpty = true;
    ll_emptyView.setVisibility(View.VISIBLE);
    swipeRefresh.setVisibility(View.GONE);
  }
}

代码示例来源:origin: north2016/T-MVP

@Override
  public void reSetEmpty() {
    if (isEmpty) {
      ll_emptyView.setVisibility(View.GONE);
      swipeRefresh.setVisibility(View.VISIBLE);
    }
  }
}

代码示例来源:origin: north2016/T-MVP

isEmpty = false;
  ll_emptyView.setVisibility(View.GONE);
  swipeRefresh.setVisibility(View.VISIBLE);
  reFetch();
}));

代码示例来源:origin: iMeiji/Toutiao

@Override
public void onSetWebView(String url, boolean flag) {
  initWebClient();
  photoView.setVisibility(View.GONE);
  swipeRefreshLayout.setVisibility(View.VISIBLE);
  // 是否为头条的网站
  if (flag) {
    webView.loadDataWithBaseURL(null, url, "text/html", "utf-8", null);
  } else {
    webView.loadUrl(shareUrl);
  }
  SlidrInterface slidrInterface = ((PhotoContentActivity) getActivity()).getSlidrInterface();
  if (slidrInterface != null) {
    slidrInterface.unlock();
  }
}

代码示例来源:origin: wangdan/AisenWeiBo

@Override
protected void onSuccess(StatusContents statusContents) {
  super.onSuccess(statusContents);
  if (mode != RefreshMode.update) {
    getRefreshView().scrollToPosition(0);
  }
  if (getSwipeRefreshLayout().getVisibility() != View.VISIBLE)
    getSwipeRefreshLayout().setVisibility(View.VISIBLE);
  if (shadowView.getVisibility() == View.VISIBLE) {
    outSearchWithData();
  }
}

代码示例来源:origin: wangdan/AisenWeiBo

@Override
public void onSearchViewClosed() {
  if (getSwipeRefreshLayout().getVisibility() == View.VISIBLE) {
    getSwipeRefreshLayout().setVisibility(View.GONE);
  }
  if (getActivity() != null) {
    getActivity().finish();
    getActivity().overridePendingTransition(0, 0);
  }
}

代码示例来源:origin: ukanth/afwall

@Override
  protected void onPostExecute(Boolean logPresent) {
    super.onPostExecute(logPresent);
    doProgress(-1);
    try {
      if ((loadDialog != null) && loadDialog.isShowing()) {
        loadDialog.dismiss();
      }
    } catch (IllegalArgumentException e) {
      // Handle or log or ignore
    } catch (final Exception e) {
      // Handle or log or ignore
    } finally {
      loadDialog = null;
    }
    mSwipeLayout.setRefreshing(false);
    if (logPresent != null && logPresent) {
      recyclerView.setVisibility(View.VISIBLE);
      mSwipeLayout.setVisibility(View.VISIBLE);
      emptyView.setVisibility(View.GONE);
      recyclerViewAdapter.notifyDataSetChanged();
    } else {
      mSwipeLayout.setVisibility(View.GONE);
      recyclerView.setVisibility(View.GONE);
      emptyView.setVisibility(View.VISIBLE);
    }
  }
}

代码示例来源:origin: ukanth/afwall

@Override
  protected void onPostExecute(Boolean logPresent) {
    super.onPostExecute(logPresent);
    //doProgress(-1);
    try {
      if ((loadDialog != null) && loadDialog.isShowing()) {
        loadDialog.dismiss();
      }
    } catch (IllegalArgumentException e) {
      // Handle or log or ignore
    } catch (final Exception e) {
      // Handle or log or ignore
    } finally {
      loadDialog = null;
    }
    mSwipeLayout.setRefreshing(false);
    if (logPresent != null && logPresent) {
      recyclerViewAdapter.notifyDataSetChanged();
      recyclerView.setVisibility(View.VISIBLE);
      mSwipeLayout.setVisibility(View.VISIBLE);
      emptyView.setVisibility(View.GONE);
    } else {
      mSwipeLayout.setVisibility(View.GONE);
      recyclerView.setVisibility(View.GONE);
      emptyView.setVisibility(View.VISIBLE);
    }
    Log.i(Api.TAG,"Ended Loading: " + System.currentTimeMillis());
  }
}

代码示例来源:origin: ukanth/afwall

mSwipeLayout.setVisibility(View.GONE);
emptyView.setVisibility(View.VISIBLE);

代码示例来源:origin: ymback/NGA-CLIENT-VER-OPEN-SOURCE

@Override
public void hideLoadingView() {
  mLoadingView.setVisibility(View.GONE);
  mSwipeRefreshLayout.setVisibility(View.VISIBLE);
}

代码示例来源:origin: ymback/NGA-CLIENT-VER-OPEN-SOURCE

@Override
public void hideLoadingView() {
  mLoadingView.setVisibility(View.GONE);
  mSwipeRefreshLayout.setVisibility(View.VISIBLE);
}

代码示例来源:origin: CoderLengary/WanAndroid

@Override
public void showEmptyView(boolean toShow) {
  emptyView.setVisibility(toShow?View.VISIBLE:View.INVISIBLE);
  refreshLayout.setVisibility(!toShow?View.VISIBLE:View.INVISIBLE);
}

代码示例来源:origin: rignaneseleo/SlimSocial-for-Facebook

@Override
public void onShowCustomView(View view, CustomViewCallback callback) {
  mCustomViewCallback = callback;
  mTargetView.addView(view);
  mCustomView = view;
  swipeRefreshLayout.setVisibility(View.GONE);
  mTargetView.setVisibility(View.VISIBLE);
  mTargetView.bringToFront();
}

代码示例来源:origin: ymback/NGA-CLIENT-VER-OPEN-SOURCE

@Override
public void hideLoadingView() {
  mLoadView.setVisibility(View.GONE);
  mSwipeRefreshLayout.setVisibility(View.VISIBLE);
}

代码示例来源:origin: ymback/NGA-CLIENT-VER-OPEN-SOURCE

private void setRefreshing(boolean refreshing) {
  if (!refreshing) {
    mRefreshLayout.setVisibility(View.VISIBLE);
    mRefreshLayout.setRefreshing(false);
    mLoadingLayout.setVisibility(View.GONE);
  }
}

代码示例来源:origin: The-LoneWolf/AndroPress

@Override
public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) {
  swipeRefreshLayout.setRefreshing(false);
  swipeRefreshLayout.setVisibility(View.GONE);
  noDataCard.setVisibility(View.VISIBLE);
}

代码示例来源:origin: rignaneseleo/SlimSocial-for-Facebook

@Override
public void onHideCustomView() {
  if (mCustomView == null)
    return;
  mCustomView.setVisibility(View.GONE);
  mTargetView.removeView(mCustomView);
  mCustomView = null;
  mTargetView.setVisibility(View.GONE);
  mCustomViewCallback.onCustomViewHidden();
  swipeRefreshLayout.setVisibility(View.VISIBLE);
}

代码示例来源:origin: byhieg/easyweather

@Override
public void showNoData() {
  mSwipeLayout.setVisibility(View.GONE);
  refresh.setVisibility(View.VISIBLE);
  Animation animation = new RotateAnimation(0, 360, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
  animation.setDuration(1000);
  animation.setRepeatCount(-1);
  animation.setInterpolator(new LinearInterpolator());
  refresh.startAnimation(animation);
  mPresenter.doRefreshInNoData();
}

代码示例来源:origin: The-LoneWolf/AndroPress

public void loadArchive() {
  postArray = new ArrayList<>();
  postArray = PostModel.listAll(PostModel.class);
  adapter.update(postArray);
  if (postArray.size() <= 0) {
    noArchiveCard.setVisibility(View.VISIBLE);
    swipeRefreshLayout.setVisibility(View.GONE);
  }
}

代码示例来源:origin: mmazzarolo/easy-bookmarks

public void showRecyclerView() {
  setupRecyclerView();
  handleArguments();
  mScrollViewNoConnection.setVisibility(View.GONE);
  mRecyclerView.setVisibility(View.VISIBLE);
  mSwipeRefreshLayout.setVisibility(View.GONE);
  mSwipeRefreshLayout.setEnabled(false);
  mIsViewVisible = true;
}

相关文章