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