当前位置: 首页>>代码示例>>Java>>正文


Java LoadingLayout类代码示例

本文整理汇总了Java中com.handmark.pulltorefresh.library.internal.LoadingLayout的典型用法代码示例。如果您正苦于以下问题:Java LoadingLayout类的具体用法?Java LoadingLayout怎么用?Java LoadingLayout使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


LoadingLayout类属于com.handmark.pulltorefresh.library.internal包,在下文中一共展示了LoadingLayout类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createLoadingLayoutClazz

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  
 */
@SuppressWarnings("unchecked")
public static Class<? extends LoadingLayout> createLoadingLayoutClazz(
		String clazzName) {
	Class<? extends LoadingLayout> loadingLayoutClazz = null;
	if ( clazzName == null ) {
		loadingLayoutClazz = DefaultLoadingLayoutFactory.createLoadingLayoutClazz(clazzName);
		return loadingLayoutClazz;
	}
	
	try {
		loadingLayoutClazz = (Class<LoadingLayout>) Class.forName(clazzName);

	} catch (ClassNotFoundException e) {
		Log.e(LOG_TAG,"The loading layout you have chosen class has not been found.", e);
		loadingLayoutClazz = DefaultLoadingLayoutFactory.createLoadingLayoutClazz(clazzName);
	} 

	return loadingLayoutClazz;
}
 
开发者ID:Dnet3,项目名称:CustomAndroidOneSheeld,代码行数:27,代码来源:LoadingLayoutFactory.java

示例2: 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;
}
 
开发者ID:Dnet3,项目名称:CustomAndroidOneSheeld,代码行数:28,代码来源:LoadingLayoutFactory.java

示例3: createLoadingLayout

import com.handmark.pulltorefresh.library.internal.LoadingLayout; //导入依赖的package包/类
LoadingLayout createLoadingLayout(Context context, Mode mode, Orientation scrollDirection, TypedArray attrs) {
	switch (this) {
		case ROTATE:
		default:
			return new RotateLoadingLayout(context, mode, scrollDirection, attrs);
		case FLIP:
			return new FlipLoadingLayout(context, mode, scrollDirection, attrs);
	}
}
 
开发者ID:ultrasonic,项目名称:ultrasonic,代码行数:10,代码来源:PullToRefreshBase.java

示例4: PullToRefreshWebView

import com.handmark.pulltorefresh.library.internal.LoadingLayout; //导入依赖的package包/类
public PullToRefreshWebView(Context context, Mode mode, Class<? extends LoadingLayout> loadingLayoutClazz) {
	super(context, mode, loadingLayoutClazz);

	/**
	 * Added so that by default, Pull-to-Refresh refreshes the page
	 */
	setOnRefreshListener(defaultOnRefreshListener);
	mRefreshableView.setWebChromeClient(defaultWebChromeClient);
}
 
开发者ID:Dnet3,项目名称:CustomAndroidOneSheeld,代码行数:10,代码来源:PullToRefreshWebView.java

示例5: createLoadingLayout

import com.handmark.pulltorefresh.library.internal.LoadingLayout; //导入依赖的package包/类
LoadingLayout createLoadingLayout(Context context, Mode mode, Orientation
        scrollDirection, TypedArray attrs) {
    switch (this) {
        case FLIP:
            return new FlipLoadingLayout(context, mode, scrollDirection, attrs);
        default:
            return new RotateLoadingLayout(context, mode, scrollDirection, attrs);
    }
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:10,代码来源:PullToRefreshBase.java

示例6: createLoadingLayoutFooter

import com.handmark.pulltorefresh.library.internal.LoadingLayout; //导入依赖的package包/类
LoadingLayout createLoadingLayoutFooter(Context context, Mode mode,
                                        Orientation scrollDirection, TypedArray attrs) {
    switch (this) {
        case ROTATE:
        default:
            return new RotateLoadingLayoutFooter(context, mode,
                    scrollDirection, attrs);
        case FLIP:
            return new FlipLoadingLayoutFooter(context, mode,
                    scrollDirection, attrs);
    }
}
 
开发者ID:BigAppOS,项目名称:BigApp_WordPress_Android,代码行数:13,代码来源:PullToRefreshBase.java

示例7: 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);
    }
}
 
开发者ID:leibing8912,项目名称:LbaizxfPulltoRefresh,代码行数:14,代码来源:JkPullToRefreshScrollView.java

示例8: createLoadingLayout

import com.handmark.pulltorefresh.library.internal.LoadingLayout; //导入依赖的package包/类
LoadingLayout createLoadingLayout(Context context, Mode mode, Orientation scrollDirection, TypedArray attrs) {
    switch (this) {
        case ROTATE:
        default:
            return new RotateLoadingLayout(context, mode, scrollDirection, attrs);
        case FLIP:
            return new FlipLoadingLayout(context, mode, scrollDirection, attrs);
    }
}
 
开发者ID:BigAppOS,项目名称:BigApp_Discuz_Android,代码行数:10,代码来源:PullToRefreshBase.java

示例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;
}
 
开发者ID:BigAppOS,项目名称:BigApp_WordPress_Android,代码行数:8,代码来源:PullToRefreshBase.java

示例10: LoadingLayoutProxy

import com.handmark.pulltorefresh.library.internal.LoadingLayout; //导入依赖的package包/类
LoadingLayoutProxy() {
	mLoadingLayouts = new HashSet<LoadingLayout>();
}
 
开发者ID:ultrasonic,项目名称:ultrasonic,代码行数:4,代码来源:LoadingLayoutProxy.java

示例11: setLastUpdatedLabel

import com.handmark.pulltorefresh.library.internal.LoadingLayout; //导入依赖的package包/类
@Override
public void setLastUpdatedLabel(CharSequence label) {
	for (LoadingLayout layout : mLoadingLayouts) {
		layout.setLastUpdatedLabel(label);
	}
}
 
开发者ID:ultrasonic,项目名称:ultrasonic,代码行数:7,代码来源:LoadingLayoutProxy.java

示例12: setLoadingDrawable

import com.handmark.pulltorefresh.library.internal.LoadingLayout; //导入依赖的package包/类
@Override
public void setLoadingDrawable(Drawable drawable) {
	for (LoadingLayout layout : mLoadingLayouts) {
		layout.setLoadingDrawable(drawable);
	}
}
 
开发者ID:ultrasonic,项目名称:ultrasonic,代码行数:7,代码来源:LoadingLayoutProxy.java

示例13: setRefreshingLabel

import com.handmark.pulltorefresh.library.internal.LoadingLayout; //导入依赖的package包/类
@Override
public void setRefreshingLabel(CharSequence refreshingLabel) {
	for (LoadingLayout layout : mLoadingLayouts) {
		layout.setRefreshingLabel(refreshingLabel);
	}
}
 
开发者ID:ultrasonic,项目名称:ultrasonic,代码行数:7,代码来源:LoadingLayoutProxy.java

示例14: setPullLabel

import com.handmark.pulltorefresh.library.internal.LoadingLayout; //导入依赖的package包/类
@Override
public void setPullLabel(CharSequence label) {
	for (LoadingLayout layout : mLoadingLayouts) {
		layout.setPullLabel(label);
	}
}
 
开发者ID:ultrasonic,项目名称:ultrasonic,代码行数:7,代码来源:LoadingLayoutProxy.java

示例15: setReleaseLabel

import com.handmark.pulltorefresh.library.internal.LoadingLayout; //导入依赖的package包/类
@Override
public void setReleaseLabel(CharSequence label) {
	for (LoadingLayout layout : mLoadingLayouts) {
		layout.setReleaseLabel(label);
	}
}
 
开发者ID:ultrasonic,项目名称:ultrasonic,代码行数:7,代码来源:LoadingLayoutProxy.java


注:本文中的com.handmark.pulltorefresh.library.internal.LoadingLayout类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。