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


Java EmptyViewMethodAccessor类代码示例

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


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

示例1: setEmptyView

import com.handmark.pulltorefresh.library.internal.EmptyViewMethodAccessor; //导入依赖的package包/类
public final void setEmptyView(View newEmptyView) {
    FrameLayout refreshableViewWrapper = getRefreshableViewWrapper();
    if (newEmptyView != null) {
        newEmptyView.setClickable(true);
        ViewParent newEmptyViewParent = newEmptyView.getParent();
        if (newEmptyViewParent != null && (newEmptyViewParent instanceof ViewGroup)) {
            ((ViewGroup) newEmptyViewParent).removeView(newEmptyView);
        }
        LayoutParams lp = convertEmptyViewLayoutParams(newEmptyView.getLayoutParams());
        if (lp != null) {
            refreshableViewWrapper.addView(newEmptyView, lp);
        } else {
            refreshableViewWrapper.addView(newEmptyView);
        }
    }
    if (this.mRefreshableView instanceof EmptyViewMethodAccessor) {
        ((EmptyViewMethodAccessor) this.mRefreshableView).setEmptyViewInternal(newEmptyView);
    } else {
        ((AbsListView) this.mRefreshableView).setEmptyView(newEmptyView);
    }
    this.mEmptyView = newEmptyView;
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:23,代码来源:PullToRefreshAdapterViewBase.java

示例2: setEmptyView

import com.handmark.pulltorefresh.library.internal.EmptyViewMethodAccessor; //导入依赖的package包/类
/**
 * Sets the Empty View to be used by the Adapter View.
 * 
 * We need it handle it ourselves so that we can Pull-to-Refresh when the
 * Empty View is shown.
 * 
 * Please note, you do <strong>not</strong> usually need to call this method
 * yourself. Calling setEmptyView on the AdapterView will automatically call
 * this method and set everything up. This includes when the Android
 * Framework automatically sets the Empty View based on it's ID.
 * 
 * @param newEmptyView
 *            - Empty View to be used
 */
public final void setEmptyView(View newEmptyView) {
	// If we already have an Empty View, remove it
	if (null != emptyView) {
		refreshableViewHolder.removeView(emptyView);
	}

	if (null != newEmptyView) {
		ViewParent newEmptyViewParent = newEmptyView.getParent();
		if (null != newEmptyViewParent && newEmptyViewParent instanceof ViewGroup) {
			((ViewGroup) newEmptyViewParent).removeView(newEmptyView);
		}

		this.refreshableViewHolder.addView(newEmptyView, ViewGroup.LayoutParams.FILL_PARENT,
				ViewGroup.LayoutParams.FILL_PARENT);
	}

	if (refreshableView instanceof EmptyViewMethodAccessor) {
		((EmptyViewMethodAccessor) refreshableView).setEmptyViewInternal(newEmptyView);
	} else {
		this.refreshableView.setEmptyView(newEmptyView);
	}
}
 
开发者ID:danoulis,项目名称:booking-app-android,代码行数:37,代码来源:PullToRefreshAdapterViewBase.java

示例3: setEmptyView

import com.handmark.pulltorefresh.library.internal.EmptyViewMethodAccessor; //导入依赖的package包/类
/**
 * Sets the Empty View to be used by the Adapter View.
 * <p/>
 * We need it handle it ourselves so that we can Pull-to-Refresh when the
 * Empty View is shown.
 * <p/>
 * Please note, you do <strong>not</strong> usually need to call this method
 * yourself. Calling setEmptyView on the AdapterView will automatically call
 * this method and set everything up. This includes when the Android
 * Framework automatically sets the Empty View based on it's ID.
 * 
 * @param newEmptyView - Empty View to be used
 */
public final void setEmptyView(View newEmptyView) {
	FrameLayout refreshableViewWrapper = getRefreshableViewWrapper();

	if (null != newEmptyView) {
		// New view needs to be clickable so that Android recognizes it as a
		// target for Touch Events
		newEmptyView.setClickable(true);

		ViewParent newEmptyViewParent = newEmptyView.getParent();
		if (null != newEmptyViewParent && newEmptyViewParent instanceof ViewGroup) {
			((ViewGroup) newEmptyViewParent).removeView(newEmptyView);
		}

		// We need to convert any LayoutParams so that it works in our
		// FrameLayout
		FrameLayout.LayoutParams lp = convertEmptyViewLayoutParams(newEmptyView.getLayoutParams());
		if (null != lp) {
			refreshableViewWrapper.addView(newEmptyView, lp);
		} else {
			refreshableViewWrapper.addView(newEmptyView);
		}
	}

	if (mRefreshableView instanceof EmptyViewMethodAccessor) {
		((EmptyViewMethodAccessor) mRefreshableView).setEmptyViewInternal(newEmptyView);
	} else {
		mRefreshableView.setEmptyView(newEmptyView);
	}
	mEmptyView = newEmptyView;
}
 
开发者ID:ultrasonic,项目名称:ultrasonic,代码行数:44,代码来源:PullToRefreshAdapterViewBase.java

示例4: setEmptyView

import com.handmark.pulltorefresh.library.internal.EmptyViewMethodAccessor; //导入依赖的package包/类
/**
 * Sets the Empty View to be used by the Adapter View.
 * <p/>
 * We need it handle it ourselves so that we can Pull-to-Refresh when the
 * Empty View is shown.
 * <p/>
 * Please note, you do <strong>not</strong> usually need to call this method
 * yourself. Calling setEmptyView on the AdapterView will automatically call
 * this method and set everything up. This includes when the Android
 * Framework automatically sets the Empty View based on it's ID.
 * 
 * @param newEmptyView - Empty View to be used
 */
public final void setEmptyView(View newEmptyView) {
	FrameLayout refreshableViewWrapper = getRefreshableViewWrapper();

	// If we already have an Empty View, remove it
	if (null != mEmptyView) {
		refreshableViewWrapper.removeView(mEmptyView);
	}

	if (null != newEmptyView) {
		// New view needs to be clickable so that Android recognizes it as a
		// target for Touch Events
		newEmptyView.setClickable(true);

		ViewParent newEmptyViewParent = newEmptyView.getParent();
		if (null != newEmptyViewParent && newEmptyViewParent instanceof ViewGroup) {
			((ViewGroup) newEmptyViewParent).removeView(newEmptyView);
		}

		// We need to convert any LayoutParams so that it works in our
		// FrameLayout
		FrameLayout.LayoutParams lp = convertEmptyViewLayoutParams(newEmptyView.getLayoutParams());
		if (null != lp) {
			refreshableViewWrapper.addView(newEmptyView, lp);
		} else {
			refreshableViewWrapper.addView(newEmptyView);
		}
	}

	if (mRefreshableView instanceof EmptyViewMethodAccessor) {
		((EmptyViewMethodAccessor) mRefreshableView).setEmptyViewInternal(newEmptyView);
	} else {
		mRefreshableView.setEmptyView(newEmptyView);
	}
	mEmptyView = newEmptyView;
}
 
开发者ID:scoute-dich,项目名称:K9-MailClient,代码行数:49,代码来源:PullToRefreshAdapterViewBase.java

示例5: setEmptyView

import com.handmark.pulltorefresh.library.internal.EmptyViewMethodAccessor; //导入依赖的package包/类
/**
 * Sets the Empty View to be used by the Adapter View.
 * <p/>
 * We need it handle it ourselves so that we can Pull-to-Refresh when the
 * Empty View is shown.
 * <p/>
 * Please note, you do <strong>not</strong> usually need to call this method
 * yourself. Calling setEmptyView on the AdapterView will automatically call
 * this method and set everything up. This includes when the Android
 * Framework automatically sets the Empty View based on it's ID.
 *
 * @param newEmptyView - Empty View to be used
 */
public final void setEmptyView(View newEmptyView)
{
    FrameLayout refreshableViewWrapper = getRefreshableViewWrapper();

    if (null != newEmptyView)
    {
        // New view needs to be clickable so that Android recognizes it as a
        // target for Touch Events
        newEmptyView.setClickable(true);

        ViewParent newEmptyViewParent = newEmptyView.getParent();
        if (null != newEmptyViewParent && newEmptyViewParent instanceof ViewGroup)
        {
            ((ViewGroup) newEmptyViewParent).removeView(newEmptyView);
        }

        // We need to convert any LayoutParams so that it works in our
        // FrameLayout
        FrameLayout.LayoutParams lp = convertEmptyViewLayoutParams(newEmptyView.getLayoutParams());
        if (null != lp)
        {
            refreshableViewWrapper.addView(newEmptyView, lp);
        } else
        {
            refreshableViewWrapper.addView(newEmptyView);
        }
    }

    if (mRefreshableView instanceof EmptyViewMethodAccessor)
    {
        ((EmptyViewMethodAccessor) mRefreshableView).setEmptyViewInternal(newEmptyView);
    } else
    {
        mRefreshableView.setEmptyView(newEmptyView);
    }
    mEmptyView = newEmptyView;
}
 
开发者ID:BigAppOS,项目名称:BigApp_WordPress_Android,代码行数:51,代码来源:PullToRefreshAdapterViewBase.java


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