本文整理汇总了Java中com.handmark.pulltorefresh.library.internal.LoadingLayout.setVisibility方法的典型用法代码示例。如果您正苦于以下问题:Java LoadingLayout.setVisibility方法的具体用法?Java LoadingLayout.setVisibility怎么用?Java LoadingLayout.setVisibility使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.handmark.pulltorefresh.library.internal.LoadingLayout
的用法示例。
在下文中一共展示了LoadingLayout.setVisibility方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createLoadingLayout
import com.handmark.pulltorefresh.library.internal.LoadingLayout; //导入方法依赖的package包/类
/**
* Create a {@code LoadingLayout} instance matched by <b>{@code clazz} token</b>
* @param layoutCode Loading layout code, which must be defined in pulltorefresh.xml
* @param context
* @param mode
* @return {@code LoadingLayout} instance if the class matched by {@code layoutCode} exists, or {@code RotateLoadingLayout} instance if not
*/
public static LoadingLayout createLoadingLayout(
Class<? extends LoadingLayout> clazz, Context context, Mode mode,
Orientation orientation, TypedArray attrs) {
LoadingLayout layout = null;
// Prevent NullPointerException
if ( clazz == null ) {
Log.i(LOG_TAG, "The Class token of the Loading Layout is missing. Default Loading Layout will be used.");
clazz = DefaultLoadingLayoutFactory.createLoadingLayoutClazz("");
}
layout = tryNewInstance(clazz, context, mode, orientation, attrs);
// If trying to create new instance has failed,
if (layout == null) {
layout = DefaultLoadingLayoutFactory.createLoadingLayout(clazz, context, mode, orientation, attrs);
}
layout.setVisibility(View.INVISIBLE);
return layout;
}
示例2: createLoadingLayout
import com.handmark.pulltorefresh.library.internal.LoadingLayout; //导入方法依赖的package包/类
protected LoadingLayout createLoadingLayout(Context context, Mode mode,
TypedArray attrs) {
LoadingLayout layout = mLoadingAnimationStyle.createLoadingLayout(
context, mode, getPullToRefreshScrollDirection(), attrs);
layout.setVisibility(View.INVISIBLE);
return layout;
}
示例3: createLoadingLayoutFooter
import com.handmark.pulltorefresh.library.internal.LoadingLayout; //导入方法依赖的package包/类
protected LoadingLayout createLoadingLayoutFooter(Context context,
Mode mode, TypedArray attrs) {
LoadingLayout layout = mLoadingAnimationStyle
.createLoadingLayoutFooter(context, mode,
getPullToRefreshScrollDirection(), attrs);
layout.setVisibility(View.INVISIBLE);
return layout;
}
示例4: createLoadingLayout
import com.handmark.pulltorefresh.library.internal.LoadingLayout; //导入方法依赖的package包/类
@Override
protected LoadingLayout createLoadingLayout(Context context, Mode mode, TypedArray attrs) {
// 触发下拉刷新操作
if(mode == Mode.PULL_FROM_START){
LoadingLayout layout =
new TweenAnimLoadingLayout(context,mode,
getPullToRefreshScrollDirection(),attrs);
layout.setVisibility(View.INVISIBLE);
return layout;
}else{
return super.createLoadingLayout(context, mode, attrs);
}
}
示例5: createLoadingLayout
import com.handmark.pulltorefresh.library.internal.LoadingLayout; //导入方法依赖的package包/类
protected LoadingLayout createLoadingLayout(Context context, Mode mode, TypedArray attrs) {
LoadingLayout layout = mLoadingAnimationStyle.createLoadingLayout(context, mode,
getPullToRefreshScrollDirection(), attrs);
layout.setVisibility(View.INVISIBLE);
return layout;
}
示例6: onRefreshing
import com.handmark.pulltorefresh.library.internal.LoadingLayout; //导入方法依赖的package包/类
protected void onRefreshing(boolean doScroll) {
ListAdapter adapter = ((ListView) this.mRefreshableView).getAdapter();
if (!this.mListViewExtrasEnabled || !getShowViewWhileRefreshing() || adapter == null ||
adapter.isEmpty()) {
super.onRefreshing(doScroll);
return;
}
LoadingLayout origLoadingView;
LoadingLayout listViewLoadingView;
LoadingLayout oppositeListViewLoadingView;
int selection;
int scrollToY;
super.onRefreshing(false);
switch (getCurrentMode()) {
case MANUAL_REFRESH_ONLY:
case PULL_FROM_END:
origLoadingView = getFooterLayout();
listViewLoadingView = this.mFooterLoadingView;
oppositeListViewLoadingView = this.mHeaderLoadingView;
selection = ((ListView) this.mRefreshableView).getCount() - 1;
scrollToY = getScrollY() - getFooterSize();
break;
default:
origLoadingView = getHeaderLayout();
listViewLoadingView = this.mHeaderLoadingView;
oppositeListViewLoadingView = this.mFooterLoadingView;
selection = 0;
scrollToY = getScrollY() + getHeaderSize();
break;
}
origLoadingView.reset();
origLoadingView.hideAllViews();
oppositeListViewLoadingView.setVisibility(8);
listViewLoadingView.setVisibility(0);
listViewLoadingView.refreshing();
if (doScroll) {
disableLoadingLayoutVisibilityChanges();
setHeaderScroll(scrollToY);
((ListView) this.mRefreshableView).setSelection(selection);
smoothScrollTo(0);
}
}
示例7: onReset
import com.handmark.pulltorefresh.library.internal.LoadingLayout; //导入方法依赖的package包/类
protected void onReset() {
boolean scrollLvToEdge = true;
if (this.mListViewExtrasEnabled) {
LoadingLayout originalLoadingLayout;
LoadingLayout listViewLoadingLayout;
int selection;
int scrollToHeight;
switch (getCurrentMode()) {
case MANUAL_REFRESH_ONLY:
case PULL_FROM_END:
originalLoadingLayout = getFooterLayout();
listViewLoadingLayout = this.mFooterLoadingView;
selection = ((ListView) this.mRefreshableView).getCount() - 1;
scrollToHeight = getFooterSize();
if (Math.abs(((ListView) this.mRefreshableView).getLastVisiblePosition() -
selection) > 1) {
scrollLvToEdge = false;
}
break;
default:
originalLoadingLayout = getHeaderLayout();
listViewLoadingLayout = this.mHeaderLoadingView;
scrollToHeight = -getHeaderSize();
selection = 0;
if (Math.abs(((ListView) this.mRefreshableView).getFirstVisiblePosition() -
0) > 1) {
scrollLvToEdge = false;
break;
}
break;
}
if (listViewLoadingLayout.getVisibility() == 0) {
originalLoadingLayout.showInvisibleViews();
listViewLoadingLayout.setVisibility(8);
if (scrollLvToEdge && getState() != State.MANUAL_REFRESHING) {
((ListView) this.mRefreshableView).setSelection(selection);
setHeaderScroll(scrollToHeight);
}
}
super.onReset();
return;
}
super.onReset();
}
示例8: createLoadingLayout
import com.handmark.pulltorefresh.library.internal.LoadingLayout; //导入方法依赖的package包/类
protected LoadingLayout createLoadingLayout(Context context, Mode mode, TypedArray attrs) {
LoadingLayout layout = this.mLoadingAnimationStyle.createLoadingLayout(context, mode,
getPullToRefreshScrollDirection(), attrs);
layout.setVisibility(4);
return layout;
}
示例9: createLoadingLayout
import com.handmark.pulltorefresh.library.internal.LoadingLayout; //导入方法依赖的package包/类
protected LoadingLayout createLoadingLayout(Context context, Mode mode, TypedArray attrs) {
LoadingLayout layout = mLoadingAnimationStyle.createLoadingLayout(context, mode,
getPullToRefreshScrollDirection(), attrs);
layout.setVisibility(View.INVISIBLE);
return layout;
}