本文整理了Java中android.support.v4.widget.SwipeRefreshLayout.setEnabled()
方法的一些代码示例,展示了SwipeRefreshLayout.setEnabled()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SwipeRefreshLayout.setEnabled()
方法的具体详情如下:
包路径:android.support.v4.widget.SwipeRefreshLayout
类名称:SwipeRefreshLayout
方法名:setEnabled
暂无
代码示例来源:origin: Rukey7/MvpApp
/**
* 使能刷新
* @param refreshLayout
* @param isEnable
*/
public static void enableRefresh(SwipeRefreshLayout refreshLayout, boolean isEnable) {
if (refreshLayout != null) {
refreshLayout.setEnabled(isEnable);
}
}
代码示例来源:origin: Rukey7/MvpApp
@Override
public void onOffsetChanged(AppBarLayout appBarLayout, int verticalOffset) {
if (verticalOffset >= 0) {
refreshLayout.setEnabled(true);
} else {
refreshLayout.setEnabled(false);
}
}
});
代码示例来源:origin: stackoverflow.com
public void onOffsetChanged(AppBarLayout appBarLayout, int i) {
mSwipeRefreshLayout.setEnabled(i == 0);
代码示例来源:origin: cymcsg/UltimateAndroid
/**
* Set the listener when refresh is triggered and enable the SwipeRefreshLayout
*
* @param listener
*/
public void setRefreshListener(SwipeRefreshLayout.OnRefreshListener listener) {
mSwipeRefreshLayout.setEnabled(true);
mSwipeRefreshLayout.setOnRefreshListener(listener);
}
代码示例来源:origin: rengwuxian/RxJavaSamples
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_token, container, false);
ButterKnife.bind(this, view);
swipeRefreshLayout.setColorSchemeColors(Color.BLUE, Color.GREEN, Color.RED, Color.YELLOW);
swipeRefreshLayout.setEnabled(false);
return view;
}
代码示例来源:origin: rengwuxian/RxJavaSamples
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_token_advanced, container, false);
ButterKnife.bind(this, view);
swipeRefreshLayout.setColorSchemeColors(Color.BLUE, Color.GREEN, Color.RED, Color.YELLOW);
swipeRefreshLayout.setEnabled(false);
return view;
}
代码示例来源:origin: rengwuxian/RxJavaSamples
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_zip, container, false);
ButterKnife.bind(this, view);
gridRv.setLayoutManager(new GridLayoutManager(getActivity(), 2));
gridRv.setAdapter(adapter);
swipeRefreshLayout.setColorSchemeColors(Color.BLUE, Color.GREEN, Color.RED, Color.YELLOW);
swipeRefreshLayout.setEnabled(false);
return view;
}
代码示例来源:origin: rengwuxian/RxJavaSamples
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_cache, container, false);
ButterKnife.bind(this, view);
cacheRv.setLayoutManager(new GridLayoutManager(getActivity(), 2));
cacheRv.setAdapter(adapter);
swipeRefreshLayout.setColorSchemeColors(Color.BLUE, Color.GREEN, Color.RED, Color.YELLOW);
swipeRefreshLayout.setEnabled(false);
return view;
}
代码示例来源:origin: rengwuxian/RxJavaSamples
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_elementary, container, false);
ButterKnife.bind(this, view);
gridRv.setLayoutManager(new GridLayoutManager(getActivity(), 2));
gridRv.setAdapter(adapter);
swipeRefreshLayout.setColorSchemeColors(Color.BLUE, Color.GREEN, Color.RED, Color.YELLOW);
swipeRefreshLayout.setEnabled(false);
return view;
}
代码示例来源:origin: rengwuxian/RxJavaSamples
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_map, container, false);
ButterKnife.bind(this, view);
gridRv.setLayoutManager(new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL));
gridRv.setAdapter(adapter);
swipeRefreshLayout.setColorSchemeColors(Color.BLUE, Color.GREEN, Color.RED, Color.YELLOW);
swipeRefreshLayout.setEnabled(false);
return view;
}
代码示例来源:origin: cymcsg/UltimateAndroid
private void initView() {
LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View view = inflater.inflate(R.layout.ultimate_listview_layout, this);
mSwipeRefreshLayout = (SwipeRefreshLayout) view.findViewById(R.id.ultimate_listview_swipe_layout);
mBasicUltimateListView = (BasicUltimateListView) view.findViewById(R.id.basicUltimateListView);
mSwipeRefreshLayout.setEnabled(false);
mSwipeRefreshLayout.setColorSchemeResources(android.R.color.holo_blue_bright,
android.R.color.holo_green_light,
android.R.color.holo_orange_light,
android.R.color.holo_red_light);
}
代码示例来源:origin: k9mail/k-9
private void initializePullToRefresh(View layout) {
swipeRefreshLayout = layout.findViewById(R.id.swiperefresh);
listView = layout.findViewById(R.id.message_list);
if (isRemoteSearchAllowed()) {
swipeRefreshLayout.setOnRefreshListener(
new SwipeRefreshLayout.OnRefreshListener() {
@Override
public void onRefresh() {
onRemoteSearchRequested();
}
}
);
} else if (isCheckMailSupported()) {
swipeRefreshLayout.setOnRefreshListener(
new SwipeRefreshLayout.OnRefreshListener() {
@Override
public void onRefresh() {
checkMail();
}
}
);
}
// Disable pull-to-refresh until the message list has been loaded
swipeRefreshLayout.setEnabled(false);
}
代码示例来源:origin: wangdan/AisenWeiBo
@Override
protected void layoutInit(LayoutInflater inflater, Bundle savedInstanceSate) {
super.layoutInit(inflater, savedInstanceSate);
getSwipeRefreshLayout().setEnabled(false);
}
代码示例来源:origin: wangdan/AisenWeiBo
@Override
protected void setupSwipeRefreshLayout() {
super.setupSwipeRefreshLayout();
getSwipeRefreshLayout().setEnabled(false);
}
代码示例来源:origin: wangdan/AisenWeiBo
@Override
protected void layoutInit(LayoutInflater inflater, Bundle savedInstanceSate) {
super.layoutInit(inflater, savedInstanceSate);
getSwipeRefreshLayout().setEnabled(false);
}
代码示例来源:origin: north2016/T-MVP
swipeRefresh.setEnabled(isRefreshable);
if (isReverse) {
mLayoutManager.setStackFromEnd(true);//列表再底部开始展示,反转后由上面开始展示
代码示例来源:origin: k9mail/k-9
/**
* User has requested a remote search. Setup the bundle and start the intent.
*/
private void onRemoteSearchRequested() {
String searchAccount;
String searchFolder;
searchAccount = account.getUuid();
searchFolder = currentFolder.serverId;
String queryString = search.getRemoteSearchArguments();
remoteSearchPerformed = true;
remoteSearchFuture = messagingController.searchRemoteMessages(searchAccount, searchFolder,
queryString, null, null, activityListener);
swipeRefreshLayout.setEnabled(false);
fragmentListener.remoteSearchStarted();
}
代码示例来源:origin: k9mail/k-9
swipeRefreshLayout.setEnabled(isPullToRefreshAllowed());
代码示例来源:origin: ISchwarz23/SortableTableView
/**
* Toggles the swipe to refresh feature to the user.
*
* @param enabled Whether the swipe to refresh feature shall be enabled or not.
*/
public void setSwipeToRefreshEnabled(final boolean enabled) {
swipeRefreshLayout.setEnabled(enabled);
}
代码示例来源:origin: TheFinestArtist/FinestWebView-Android
swipeRefreshLayout.setEnabled(showSwipeRefreshLayout);
if (showSwipeRefreshLayout) {
swipeRefreshLayout.post(new Runnable() {
内容来源于网络,如有侵权,请联系作者删除!