當前位置: 首頁>>代碼示例>>Java>>正文


Java IndicatorLayout類代碼示例

本文整理匯總了Java中com.handmark.pulltorefresh.library.internal.IndicatorLayout的典型用法代碼示例。如果您正苦於以下問題:Java IndicatorLayout類的具體用法?Java IndicatorLayout怎麽用?Java IndicatorLayout使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


IndicatorLayout類屬於com.handmark.pulltorefresh.library.internal包,在下文中一共展示了IndicatorLayout類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createIndicatorLayoutClazz

import com.handmark.pulltorefresh.library.internal.IndicatorLayout; //導入依賴的package包/類
/**
 * Create the class token matched by <b>class name</b>
 * @param clazzName Class name such as "com.handmark.pulltorefresh.library.internal.DefaultIndicatorLayout"
 * @return Class token if the class matched by class name exists, or the class token of {@code DefaultIndicatorLayout} instance if not  
 */
@SuppressWarnings("unchecked")
public static Class<? extends IndicatorLayout> createIndicatorLayoutClazz(String clazzName) {
	Class<? extends IndicatorLayout> clazz = null;
	if (clazzName == null) {
		clazz = DefaultIndicatorLayoutFactory.createIndicatorLayoutClazz(clazzName);
		return clazz;
	}
	
		try {
		clazz = (Class<? extends IndicatorLayout> )Class.forName(clazzName);
		
	} catch (ClassNotFoundException e) {
		Log.e(LOG_TAG, "The indicator layout you have chosen class has not been found.", e);
		clazz = DefaultIndicatorLayoutFactory.createIndicatorLayoutClazz(clazzName);
		
	}
	
	return clazz;
}
 
開發者ID:Dnet3,項目名稱:CustomAndroidOneSheeld,代碼行數:25,代碼來源:IndicatorLayoutFactory.java

示例2: createIndicatorLayout

import com.handmark.pulltorefresh.library.internal.IndicatorLayout; //導入依賴的package包/類
/**
 * Create a {@code IndicatorLayout} instance matched by <b>{@code clazz} token</b> 
 * @param clazz Indicator layout class token, which must be defined in pulltorefresh.xml
 * @param context 
 * @param mode 
 * @return {@code IndicatorLayout} instance if the class matched by {@code layoutCode} exists, or {@code DefaultIndicatorLayout} instance if not  
 */
public static IndicatorLayout createIndicatorLayout(
		Class<? extends IndicatorLayout> clazz, Context context, Mode mode) {
	IndicatorLayout layout = null;
	// Prevent NullPointerException 
	if ( clazz == null ) {
		Log.i(LOG_TAG, "The Class token of the Indicator Layout is missing. Default Indicator Layout will be used.");
		clazz = DefaultIndicatorLayoutFactory.createIndicatorLayoutClazz("");
	}
	
	layout = tryNewInstance(clazz, context, mode);
	
	// If trying to create new instance has failed,
	if (layout == null) {
		layout = DefaultIndicatorLayoutFactory.createIndicatorLayout(clazz, context, mode);
	}

	layout.setVisibility(View.INVISIBLE);
	return layout;
}
 
開發者ID:Dnet3,項目名稱:CustomAndroidOneSheeld,代碼行數:27,代碼來源:IndicatorLayoutFactory.java

示例3: createIndicatorLayoutClazzByLayoutCode

import com.handmark.pulltorefresh.library.internal.IndicatorLayout; //導入依賴的package包/類
/**
 * Create the class token matched by <b>{@code layoutCode}</b>
 * @param layoutCode Indicator layout code, which must be defined in pulltorefresh.xml 
 * @return Class token which is matched by {@code layoutCode}, or the class token of {@code DefaultIndicatorLayout} instance if not
 */
public static Class<? extends IndicatorLayout> createIndicatorLayoutClazzByLayoutCode(String layoutCode) {
	String clazzName = PullToRefreshXmlConfiguration.getInstance().getIndicatorLayoutClazzName(layoutCode);
	return createIndicatorLayoutClazz(clazzName);
}
 
開發者ID:Dnet3,項目名稱:CustomAndroidOneSheeld,代碼行數:10,代碼來源:IndicatorLayoutFactory.java


注:本文中的com.handmark.pulltorefresh.library.internal.IndicatorLayout類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。