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

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

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

SwipeRefreshLayout.setProgressBackgroundColorSchemeColor介绍

暂无

代码示例

代码示例来源:origin: pinguo-zhouwei/CustomAdapter

/**
 * 设置刷新进度条背景色
 *  see{@link SwipeRefreshLayout#setProgressBackgroundColorSchemeColor(int)}
 * @param color
 */
public void setProgressBackgroundColorSchemeColor(@ColorInt int color) {
  if(mSwipeRefreshLayout!=null){
    mSwipeRefreshLayout.setProgressBackgroundColorSchemeColor(color);
  }
}

代码示例来源:origin: leftcoding/GankLy

private void changeSwipeRefreshLayout(@NonNull SwipeRefreshLayout swipeRefreshLayout) {
  int progressColor = getResourceData(R.attr.swipeRefreshLayoutProgressSchemeColor);
  int schemeColor = getResourceData(R.attr.swipeRefreshLayoutSchemeColors);
  swipeRefreshLayout.setProgressBackgroundColorSchemeColor(progressColor);
  swipeRefreshLayout.setColorSchemeColors(schemeColor);
}

代码示例来源:origin: leftcoding/GankLy

public static void changeSwipeRefreshLayout(SwipeRefreshLayout swipeRefreshLayout) {
  if (swipeRefreshLayout == null) {
    throw new NullPointerException("swipeRefreshLayout not be null");
  }
  int progressColor = R.color.white;
  int schemeColor = R.color.colorAccent;
  if (App.isNight()) {
    progressColor = R.color.baseSwipeRefreshLayoutProgressSchemeColor;
    schemeColor = R.color.baseSwipeRefreshLayoutSchemeColors;
  }
  swipeRefreshLayout.setProgressBackgroundColorSchemeColor(App.getAppColor(progressColor));
  swipeRefreshLayout.setColorSchemeColors(App.getAppColor(schemeColor));
}

代码示例来源:origin: chuyangliu/tastysnake

private void initRefreshLayout(View v) {
  refreshLayout = (SwipeRefreshLayout) v.findViewById(R.id.connect_swipe_layout);
  refreshLayout.setColorSchemeColors(getResources().getColor(R.color.colorPrimary));
  refreshLayout.setProgressBackgroundColorSchemeColor(Config.COLOR_MAP_BG);
  refreshLayout.setDistanceToTriggerSync(20);
  refreshLayout.setSize(SwipeRefreshLayout.DEFAULT);
  refreshLayout.setNestedScrollingEnabled(true);
  refreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
    @Override
    public void onRefresh() {
      if (!manager.isEnabled()) {
        startConnect();
      } else {
        startDiscover();
      }
    }
  });
}

代码示例来源:origin: 348476129/gank.io-with-MVVM

@Override
public void initView(@Nullable Bundle savedInstanceState) {
  binding.swipeContainer.setColorSchemeColors(getResources().getColor(R.color.colorPrimary));
  binding.swipeContainer.setProgressBackgroundColorSchemeColor(getResources().getColor(R.color.swipeColor));
  mLinearLayoutManager.scrollToPosition(homeViewModel.lastPosition.get());
  mHomeItemViewModelSingleTypeAdapter.setDecorator(new HomeAdapterDecorator() {
    @Override
    public void onHomeClick(HomeItemViewModel homeItemViewModel) {
      WebViewActivity.newIntent(getContext(),homeItemViewModel.getVideoUrl());
    }
  });
  mRecyclerviewScrollHelper = new RecyclerviewScrollHelper(binding.homeRecyclerview);
}

代码示例来源:origin: jahirfiquitiva/IconShowcase

@Override
public View onCreateView(LayoutInflater inflater, final ViewGroup container, Bundle
    savedInstanceState) {
  super.onCreateView(inflater, container, savedInstanceState);
  setHasOptionsMenu(true);
  context = getActivity();
  View layout = inflater.inflate(R.layout.wallpapers_section, container, false);
  noConnection = (ImageView) layout.findViewById(R.id.no_connected_icon);
  mRecyclerView = (RecyclerView) layout.findViewById(R.id.wallsGrid);
  fastScroller = (RecyclerFastScroller) layout.findViewById(R.id.rvFastScroller);
  mSwipeRefreshLayout = (SwipeRefreshLayout) layout.findViewById(R.id.swipeRefreshLayout);
  progress = (ProgressBar) layout.findViewById(R.id.progress);
  if (((ShowcaseActivity) getActivity()).getPickerKey() != Config.WALLS_PICKER) {
    AdviceDialog.show(getActivity());
  }
  noConnection.setImageDrawable(IconUtils.getTintedDrawable(context, "ic_no_connection"));
  setupRecyclerView(false, 0);
  mSwipeRefreshLayout.setProgressBackgroundColorSchemeColor(
      ThemeUtils.darkOrLight(context, R.color.drawable_tint_light,
          R.color.drawable_tint_dark));
  int accent = ThemeUtils.darkOrLight(R.color.dark_theme_accent, R.color.light_theme_accent);
  mSwipeRefreshLayout.setColorSchemeResources(accent);
  mSwipeRefreshLayout.setEnabled(false);
  setupContent();
  return layout;
}

代码示例来源:origin: 348476129/gank.io-with-MVVM

@Override
public void initListeners() {
  super.initListeners();
  binding.swipeContainer.setColorSchemeColors(getResources().getColor(R.color.colorPrimary));
  binding.swipeContainer.setProgressBackgroundColorSchemeColor(getResources().getColor(R.color.swipeColor));
  binding.setRefreshListener(() -> fuliFragmentPresenter.getData(1));
  mAdapter.setPresenter((SingleTypeAdapter.Presenter<ImageItemViewModel>) imageItemViewModel -> {
    PhotoActivity.newIntent(getContext(), imageItemViewModel.url.get());
  });
   listLoadNextHelper = new ListLoadNextHelper(binding.fuliList);
  listLoadNextHelper.setListOffsetListener((lastOffset, position) -> {
    fuliViewModel.setLastOffset(lastOffset);
    fuliViewModel.setPosition(position);
  });
  listLoadNextHelper.setScrollLastListener(() -> {
    if (fuliViewModel.isDataEnable.get()) {
      fuliFragmentPresenter.loadNext();
    }
  });
}

代码示例来源:origin: 348476129/gank.io-with-MVVM

@Override
public void initListeners() {
  super.initListeners();
  binding.swipeContainer.setColorSchemeColors(getResources().getColor(R.color.colorPrimary));
  binding.swipeContainer.setProgressBackgroundColorSchemeColor(getResources().getColor(R.color.swipeColor));
  binding.setRefreshListener(() -> mClassificationPresenter.getData(1));
  mSingleTypeAdapter.setPresenter((SingleTypeAdapter.Presenter<ClassificationItemViewModel>) classificationItemViewModel -> {
    WebViewActivity.newIntent(getContext(), classificationItemViewModel.url.get());
  });
  listLoadNextHelper = new ListLoadNextHelper(binding.classificationList);
  listLoadNextHelper.setListOffsetListener((lastOffset, position) -> {
    mClassificationViewModel.setLastOffset(lastOffset);
    mClassificationViewModel.setPosition(position);
  });
  listLoadNextHelper.setScrollLastListener(() -> {
    if (mClassificationViewModel.isDataEnable.get()) {
      mClassificationPresenter.loadNext();
    }
  });
}

相关文章