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


Java ImageRequest類代碼示例

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


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

示例1: getImageRequest

import com.facebook.internal.ImageRequest; //導入依賴的package包/類
private ImageRequest getImageRequest() {
    ImageRequest request = null;
    try {
        ImageRequest.Builder requestBuilder = new ImageRequest.Builder(
                getActivity(),
                ImageRequest.getProfilePictureUrl(
                        user.getId(),
                        getResources().getDimensionPixelSize(R.dimen.com_facebook_usersettingsfragment_profile_picture_width),
                        getResources().getDimensionPixelSize(R.dimen.com_facebook_usersettingsfragment_profile_picture_height)));

        request = requestBuilder.setCallerTag(this)
                .setCallback(
                        new ImageRequest.Callback() {
                            @Override
                            public void onCompleted(ImageResponse response) {
                                processImageResponse(user.getId(), response);
                            }
                        })
                .build();
    } catch (URISyntaxException e) {
    }
    return request;
}
 
開發者ID:MobileDev418,項目名稱:AndroidBackendlessChat,代碼行數:24,代碼來源:UserSettingsFragment.java

示例2: getPresetSizeInPixels

import com.facebook.internal.ImageRequest; //導入依賴的package包/類
private int getPresetSizeInPixels(boolean forcePreset) {
    int dimensionId;
    switch (presetSizeType) {
        case SMALL:
            dimensionId = R.dimen.com_facebook_profilepictureview_preset_size_small;
            break;
        case NORMAL:
            dimensionId = R.dimen.com_facebook_profilepictureview_preset_size_normal;
            break;
        case LARGE:
            dimensionId = R.dimen.com_facebook_profilepictureview_preset_size_large;
            break;
        case CUSTOM:
            if (!forcePreset) {
                return ImageRequest.UNSPECIFIED_DIMENSION;
            } else {
                dimensionId = R.dimen.com_facebook_profilepictureview_preset_size_normal;
                break;
            }
        default:
            return ImageRequest.UNSPECIFIED_DIMENSION;
    }

    return getResources().getDimensionPixelSize(dimensionId);
}
 
開發者ID:yeloapp,項目名稱:yelo-android,代碼行數:26,代碼來源:ProfilePictureView.java

示例3: refreshImage

import com.facebook.internal.ImageRequest; //導入依賴的package包/類
private void refreshImage(boolean force)
{
	boolean changed = updateImageQueryParameters();
	// Note: do not use Utility.isNullOrEmpty here as this will cause the
	// Eclipse
	// Graphical Layout editor to fail in some cases
	if ((profileId == null)
			|| (profileId.length() == 0)
			|| ((queryWidth == ImageRequest.UNSPECIFIED_DIMENSION) && (queryHeight == ImageRequest.UNSPECIFIED_DIMENSION)))
	{
		setBlankProfilePicture();
	}
	else if (changed || force)
	{
		sendImageRequest(true);
	}
}
 
開發者ID:netanelkl,項目名稱:guitar_guy,代碼行數:18,代碼來源:ProfilePictureView.java

示例4: sendImageRequest

import com.facebook.internal.ImageRequest; //導入依賴的package包/類
private void sendImageRequest(boolean paramBoolean)
{
  try
  {
    ImageRequest localImageRequest = new ImageRequest.Builder(getContext(), ImageRequest.getProfilePictureUrl(this.profileId, this.queryWidth, this.queryHeight)).setAllowCachedRedirects(paramBoolean).setCallerTag(this).setCallback(new ImageRequest.Callback()
    {
      public void onCompleted(ImageResponse paramAnonymousImageResponse)
      {
        ProfilePictureView.this.processResponse(paramAnonymousImageResponse);
      }
    }).build();
    if (this.lastRequest != null)
      ImageDownloader.cancelRequest(this.lastRequest);
    this.lastRequest = localImageRequest;
    ImageDownloader.downloadAsync(localImageRequest);
    return;
  }
  catch (URISyntaxException localURISyntaxException)
  {
    Logger.log(LoggingBehavior.REQUESTS, 6, TAG, localURISyntaxException.toString());
  }
}
 
開發者ID:mmmsplay10,項目名稱:QuizUpWinner,代碼行數:23,代碼來源:ProfilePictureView.java

示例5: getImageRequest

import com.facebook.internal.ImageRequest; //導入依賴的package包/類
private ImageRequest getImageRequest()
{
  ImageRequest localImageRequest = null;
  try
  {
    localImageRequest = new ImageRequest.Builder(getActivity(), ImageRequest.getProfilePictureUrl(this.user.getId(), getResources().getDimensionPixelSize(R.dimen.com_facebook_usersettingsfragment_profile_picture_width), getResources().getDimensionPixelSize(R.dimen.com_facebook_usersettingsfragment_profile_picture_height))).setCallerTag(this).setCallback(new ImageRequest.Callback()
    {
      public void onCompleted(ImageResponse paramAnonymousImageResponse)
      {
        UserSettingsFragment.this.processImageResponse(UserSettingsFragment.this.user.getId(), paramAnonymousImageResponse);
      }
    }).build();
  }
  catch (URISyntaxException localURISyntaxException)
  {
  }
  return localImageRequest;
}
 
開發者ID:mmmsplay10,項目名稱:QuizUpWinner,代碼行數:19,代碼來源:UserSettingsFragment.java


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