本文整理汇总了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;
}
示例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);
}
}
示例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;
}
示例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;
}
示例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;
}