當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。