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


Java ImageResponse.isCachedRedirect方法代碼示例

本文整理匯總了Java中com.facebook.internal.ImageResponse.isCachedRedirect方法的典型用法代碼示例。如果您正苦於以下問題:Java ImageResponse.isCachedRedirect方法的具體用法?Java ImageResponse.isCachedRedirect怎麽用?Java ImageResponse.isCachedRedirect使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.facebook.internal.ImageResponse的用法示例。


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

示例1: processResponse

import com.facebook.internal.ImageResponse; //導入方法依賴的package包/類
private void processResponse(ImageResponse response) {
    // First check if the response is for the right request. We may have:
    // 1. Sent a new request, thus super-ceding this one.
    // 2. Detached this view, in which case the response should be discarded.
    if (response.getRequest() == lastRequest) {
        lastRequest = null;
        Bitmap responseImage = response.getBitmap();
        Exception error = response.getError();
        if (error != null) {
            OnErrorListener listener = onErrorListener;
            if (listener != null) {
                listener.onError(new FacebookException(
                        "Error in downloading profile picture for profileId: " + getProfileId(), error));
            } else {
                Logger.log(LoggingBehavior.REQUESTS, Log.ERROR, TAG, error.toString());
            }
        } else if (responseImage != null) {
            setImageBitmap(responseImage);

            if (response.isCachedRedirect()) {
                sendImageRequest(false);
            }
        }
    }
}
 
開發者ID:yeloapp,項目名稱:yelo-android,代碼行數:26,代碼來源:ProfilePictureView.java

示例2: processResponse

import com.facebook.internal.ImageResponse; //導入方法依賴的package包/類
private void processResponse(ImageResponse paramImageResponse)
{
  if (paramImageResponse.getRequest() == this.lastRequest)
  {
    this.lastRequest = null;
    Bitmap localBitmap = paramImageResponse.getBitmap();
    Exception localException = paramImageResponse.getError();
    if (localException != null)
    {
      OnErrorListener localOnErrorListener = this.onErrorListener;
      if (localOnErrorListener != null)
      {
        localOnErrorListener.onError(new FacebookException("Error in downloading profile picture for profileId: " + getProfileId(), localException));
        return;
      }
      Logger.log(LoggingBehavior.REQUESTS, 6, TAG, localException.toString());
      return;
    }
    if (localBitmap != null)
    {
      setImageBitmap(localBitmap);
      if (paramImageResponse.isCachedRedirect())
        sendImageRequest(false);
    }
  }
}
 
開發者ID:mmmsplay10,項目名稱:QuizUpWinner,代碼行數:27,代碼來源:ProfilePictureView.java

示例3: processResponse

import com.facebook.internal.ImageResponse; //導入方法依賴的package包/類
private void processResponse(ImageResponse response)
{
	// First check if the response is for the right request. We may have:
	// 1. Sent a new request, thus super-ceding this one.
	// 2. Detached this view, in which case the response should be
	// discarded.
	if (response.getRequest() == lastRequest)
	{
		lastRequest = null;
		Bitmap responseImage = response.getBitmap();
		Exception error = response.getError();
		if (error != null)
		{
			OnErrorListener listener = onErrorListener;
			if (listener != null)
			{
				listener.onError(new FacebookException(	"Error in downloading profile picture for profileId: "
																+ getProfileId(),
														error));
			}
			else
			{
				Logger.log(LoggingBehavior.REQUESTS,
						Log.ERROR, TAG, error.toString());
			}
		}
		else if (responseImage != null)
		{
			if (m_OnImageChangedEventListener != null)
			{
				responseImage =
						m_OnImageChangedEventListener
								.onImageChangedEventListener(responseImage);
			}

			setImageBitmap(responseImage);
			if (response.isCachedRedirect())
			{
				sendImageRequest(false);
			}
		}
	}
}
 
開發者ID:netanelkl,項目名稱:guitar_guy,代碼行數:44,代碼來源:ProfilePictureView.java


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