Android SDK Version
- AccessToken
- AccessToken.AccessTokenCreationCallback
- AccessToken.AccessTokenRefreshCallback
- AccessTokenAppIdPair
- AccessTokenManager
- AccessTokenSource
- AccessTokenTracker
- AggregateException
- All
- AppEvent
- AppEventsConstants
- AppEventsLogger
- AppEventsLogger.FlushBehavior
- AppEventsLogger.ProductAvailability
- AppEventsLogger.ProductCondition
- AppEventsManager
- AppGroupCreationContent
- AppGroupCreationContent.AppGroupPrivacy
- AppGroupCreationContent.Builder
- AppInviteContent
- AppInviteContent.Builder
- AppInviteContent.Builder.Destination
- AppInviteDialog
- AppInviteDialog.Result
- AppLink
- AppLink.Target
- AppLinkData
- AppLinkData.CompletionHandler
- AppLinkResolver
- AppLinks
- AppLinks
- AppToUserNotificationSender
- CallbackManager
- CallbackManager.Factory
- CameraEffectArguments
- CameraEffectArguments.Builder
- CameraEffectTextures
- CameraEffectTextures.Builder
- CancellationToken
- CancellationTokenRegistration
- CancellationTokenSource
- Capture
- CloudGameLoginHandler
- CodelessLoggingEventListener
- CodelessLoggingEventListener.AutoLoggingOnClickListener
- CodelessLoggingEventListener.AutoLoggingOnItemClickListener
- CodelessManager
- CodelessManager.CodelessSessionChecker
- Common
- Continuation
- Core
- CreateAppGroupDialog
- CreateAppGroupDialog.Result
- CurrentAccessTokenExpirationBroadcastReceiver
- CurrentPlaceFeedbackRequestParams
- CurrentPlaceFeedbackRequestParams.Builder
- CurrentPlaceRequestParams
- CurrentPlaceRequestParams.Builder
- CurrentPlaceRequestParams.ConfidenceLevel
- CurrentPlaceRequestParams.ScanMode
- CustomTabActivity
- CustomTabLoginMethodHandler
- CustomTabMainActivity
- CustomTabPrefetchHelper
- DaemonReceiver
- DaemonRequest
- DaemonRequest.Callback
- DefaultAudience
- DeviceAuthDialog
- DeviceLoginButton
- DeviceLoginManager
- DeviceShareButton
- DeviceShareDialog
- DeviceShareDialog.Result
- EventDeactivationManager
- ExecutorException
- FacebookActivity
- FacebookAppLinkResolver
- FacebookAuthorizationException
- FacebookBroadcastReceiver
- FacebookButtonBase
- FacebookCallback
- FacebookContentProvider
- FacebookDialog
- FacebookDialogException
- FacebookException
- FacebookGraphResponseException
- FacebookOperationCanceledException
- FacebookRequestError
- FacebookRequestError.Category
- FacebookSdk
- FacebookSdk.GraphRequestCreator
- FacebookSdk.InitializeCallback
- FacebookSdkNotInitializedException
- FacebookServiceException
- FlushResult
- FriendFinderDialog
- FriendFinderDialog.Result
- GameFeaturesLibrary
- GameRequestContent
- GameRequestContent.ActionType
- GameRequestContent.Builder
- GameRequestContent.Filters
- GameRequestDialog
- GameRequestDialog
- GameRequestDialog.Result
- GameRequestDialog.Result
- GamingGroupIntegration
- GamingGroupIntegration.Result
- GamingImageUploader
- GamingPayload
- GamingServices
- GamingVideoUploader
- GraphRequest
- GraphRequest.Callback
- GraphRequest.GraphJSONArrayCallback
- GraphRequest.GraphJSONObjectCallback
- GraphRequest.OnProgressCallback
- GraphRequest.ParcelableResourceWithMimeType
- GraphRequestAsyncTask
- GraphRequestBatch
- GraphRequestBatch.Callback
- GraphRequestBatch.OnProgressCallback
- GraphResponse
- GraphResponse.PagingDirection
- HttpMethod
- InAppAdLibrary
- InAppPurchaseLibrary
- IntegrityManager
- InternalAppEventsLogger
- JoinAppGroupDialog
- JoinAppGroupDialog.Result
- LikeView
- LikeView.AuxiliaryViewPosition
- LikeView.HorizontalAlignment
- LikeView.ObjectType
- LikeView.OnErrorListener
- LikeView.Style
- LoggingBehavior
- Login
- LoginBehavior
- LoginButton
- LoginButton.ToolTipMode
- LoginFragment
- LoginManager
- LoginResult
- LoginStatusCallback
- MessageDialog
- Messenger
- MessengerThreadParams
- MessengerThreadParams.Origin
- MessengerUtils
- MetadataIndexer
- MetadataRule
- Model
- ModelManager
- ModelManager.Task
- MTensor
- OnDeviceProcessingManager
- OpenGamingMediaDialog
- PerformanceGuardian
- PerformanceGuardian.UseCase
- PlaceFields
- PlaceInfoRequestParams
- PlaceInfoRequestParams.Builder
- PlaceManager
- PlaceManager.LocationError
- PlaceManager.OnRequestReadyCallback
- Places
- PlaceSearchRequestParams
- PlaceSearchRequestParams.Builder
- PlayableAdsLibrary
- Profile
- ProfileManager
- ProfilePictureView
- ProfilePictureView.OnErrorListener
- ProfileTracker
- RCTCodelessLoggingEventListener
- RCTCodelessLoggingEventListener.AutoLoggingOnTouchListener
- ReferralFragment
- ReferralLogger
- ReferralManager
- ReferralResult
- RemoteServiceWrapper
- RestrictiveDataManager
- SendButton
- Share
- ShareApi
- ShareBuilder
- ShareButton
- ShareButtonBase
- ShareCameraEffectContent
- ShareCameraEffectContent.Builder
- ShareContent
- ShareContent.Builder
- ShareDialog
- ShareDialog.Mode
- ShareGraphRequest
- ShareHashtag
- ShareHashtag.Builder
- ShareLinkContent
- ShareLinkContent.Builder
- ShareMedia
- ShareMedia.Builder
- ShareMedia.Type
- ShareMediaContent
- ShareMediaContent.Builder
- ShareMessengerActionButton
- ShareMessengerActionButton.Builder
- ShareMessengerGenericTemplateContent
- ShareMessengerGenericTemplateContent.Builder
- ShareMessengerGenericTemplateContent.ImageAspectRatio
- ShareMessengerGenericTemplateElement
- ShareMessengerGenericTemplateElement.Builder
- ShareMessengerMediaTemplateContent
- ShareMessengerMediaTemplateContent.Builder
- ShareMessengerMediaTemplateContent.MediaType
- ShareMessengerOpenGraphMusicTemplateContent
- ShareMessengerOpenGraphMusicTemplateContent.Builder
- ShareMessengerURLActionButton
- ShareMessengerURLActionButton.Builder
- ShareMessengerURLActionButton.WebviewHeightRatio
- ShareModel
- ShareModelBuilder
- ShareOpenGraphAction
- ShareOpenGraphAction.Builder
- ShareOpenGraphContent
- ShareOpenGraphContent.Builder
- ShareOpenGraphObject
- ShareOpenGraphObject.Builder
- ShareOpenGraphValueContainer
- ShareOpenGraphValueContainer.Builder
- SharePhoto
- SharePhoto.Builder
- SharePhotoContent
- SharePhotoContent.Builder
- Sharer
- Sharer.Result
- ShareStoryContent
- ShareStoryContent.Builder
- ShareToMessengerParams
- ShareToMessengerParamsBuilder
- ShareVideo
- ShareVideo.Builder
- ShareVideoContent
- ShareVideoContent.Builder
- SuggestedEventsManager
- Task
- Task.UnobservedExceptionHandler
- TaskCompletionSource
- ToolTipPopup
- ToolTipPopup.Style
- UnobservedTaskException
- UserDataStore
- Utils
- ViewIndexer
- ViewOnClickListener
- WebDialog
- java.lang.Object
- FrameLayout
- com.facebook.login.widget.ProfilePictureView
public class ProfilePictureView
extends FrameLayout
View that displays the profile photo of a supplied profile ID, while conforming to user specified dimensions.
Nested Class Summary
Modifier and Type | Class and Description |
---|---|
static interface | ProfilePictureView.OnErrorListener Callback interface that will be called when a network or other error is encountered while retrieving profile pictures. |
Field Summary
Modifier and Type | Field and Description |
---|---|
static int | CUSTOM Indicates that the specific size of the View will be set via layout params. |
static int | LARGE Indicates that the profile image should fit in a LARGE X LARGE space, regardless of whether the cropped or un-cropped version is chosen. |
static int | NORMAL Indicates that the profile image should fit in a NORMAL X NORMAL space, regardless of whether the cropped or un-cropped version is chosen. |
static int | SMALL Indicates that the profile image should fit in a SMALL X SMALL space, regardless of whether the cropped or un-cropped version is chosen. |
static java.lang.String | TAG Tag used when logging calls are made by ProfilePictureView |
Constructor Summary
Constructor and Description |
---|
ProfilePictureView(Context context) Constructor |
ProfilePictureView(Context context, AttributeSet attrs) Constructor |
ProfilePictureView(Context context, AttributeSet attrs, int defStyle) Constructor |
Method Summary
Modifier and Type | Method and Description |
---|---|
ProfilePictureView.OnErrorListener | getOnErrorListener() Returns the current OnErrorListener for this instance of ProfilePictureView |
int | getPresetSize() Gets the current preset size type |
java.lang.String | getProfileId() Returns the profile Id for the current profile photo |
boolean | isCropped() Indicates whether the cropped version of the profile photo has been chosen |
protected void | onDetachedFromWindow() |
protected void | onLayout(boolean changed, int left, int top, int right, int bottom) In addition to calling super.Layout(), we also attempt to get a new image that is properly sized for the layout dimensions |
protected void | onMeasure(int widthMeasureSpec, int heightMeasureSpec) Overriding onMeasure to handle the case where WRAP_CONTENT might be specified in the layout. |
protected void | onRestoreInstanceState(Parcelable state) If the passed in state is a Bundle, an attempt is made to restore from it. |
protected Parcelable | onSaveInstanceState() Some of the current state is returned as a Bundle to allow quick restoration of the ProfilePictureView object in scenarios like orientation changes. |
void | setCropped(boolean showCroppedVersion) Sets the profile photo to be the cropped version, or the original version |
void | setDefaultProfilePicture(Bitmap inputBitmap) The ProfilePictureView will display the provided image while the specified profile is being loaded, or if the specified profile is not available. |
void | setOnErrorListener(ProfilePictureView.OnErrorListener onErrorListener) Sets an OnErrorListener for this instance of ProfilePictureView to call into when certain errors occur. |
void | setPresetSize(int sizeType) Apply a preset size to this profile photo |
void | setProfileId(java.lang.String profileId) Sets the profile Id for this profile photo |
Field Detail
TAG
public static final java.lang.String TAG
Tag used when logging calls are made by ProfilePictureView
CUSTOM
public static final int CUSTOM
Indicates that the specific size of the View will be set via layout params. ProfilePictureView will default to NORMAL X NORMAL, if the layout params set on this instance do not have a fixed size. Used in calls to setPresetSize() and getPresetSize(). Corresponds with the preset_size Xml attribute that can be set on ProfilePictureView.
See Also:
SMALL
public static final int SMALL
Indicates that the profile image should fit in a SMALL X SMALL space, regardless of whether the cropped or un-cropped version is chosen. Used in calls to setPresetSize() and getPresetSize(). Corresponds with the preset_size Xml attribute that can be set on ProfilePictureView.
See Also:
NORMAL
public static final int NORMAL
Indicates that the profile image should fit in a NORMAL X NORMAL space, regardless of whether the cropped or un-cropped version is chosen. Used in calls to setPresetSize() and getPresetSize(). Corresponds with the preset_size Xml attribute that can be set on ProfilePictureView.
See Also:
LARGE
public static final int LARGE
Indicates that the profile image should fit in a LARGE X LARGE space, regardless of whether the cropped or un-cropped version is chosen. Used in calls to setPresetSize() and getPresetSize(). Corresponds with the preset_size Xml attribute that can be set on ProfilePictureView.
See Also:
Constructor Detail
ProfilePictureView
public ProfilePictureView(Context context)
Constructor
Parameters:
context
- Context for this ViewProfilePictureView
public ProfilePictureView(Context context, AttributeSet attrs)
Constructor
Parameters:
context
- Context for this Viewattrs
- AttributeSet for this View. The attribute 'preset_size' is processed hereProfilePictureView
public ProfilePictureView(Context context, AttributeSet attrs, int defStyle)
Constructor
Parameters:
context
- Context for this Viewattrs
- AttributeSet for this View. The attribute 'preset_size' is processed heredefStyle
- Default style for this ViewMethod Detail
getPresetSize
public final int getPresetSize()
Gets the current preset size type
Returns:
The current preset size type, if set; CUSTOM if not
setPresetSize
public final void setPresetSize(int sizeType)
Apply a preset size to this profile photo
Parameters:
sizeType
- The size type to apply: SMALL, NORMAL or LARGEisCropped
public final boolean isCropped()
Indicates whether the cropped version of the profile photo has been chosen
Returns:
True if the cropped version is chosen, false if not.
setCropped
public final void setCropped(boolean showCroppedVersion)
Sets the profile photo to be the cropped version, or the original version
Parameters:
showCroppedVersion
- True to select the cropped version False to select the standard versiongetProfileId
public final java.lang.String getProfileId()
Returns the profile Id for the current profile photo
Returns:
The profile Id
setProfileId
public final void setProfileId(java.lang.String profileId)
Sets the profile Id for this profile photo
Parameters:
profileId
- The profileId NULL/Empty String will show the blank profile photogetOnErrorListener
public final ProfilePictureView.OnErrorListener getOnErrorListener()
Returns the current OnErrorListener for this instance of ProfilePictureView
Returns:
The OnErrorListener
setOnErrorListener
public final void setOnErrorListener(ProfilePictureView.OnErrorListener onErrorListener)
Sets an OnErrorListener for this instance of ProfilePictureView to call into when certain errors occur.
Parameters:
onErrorListener
- The Listener object to setsetDefaultProfilePicture
public final void setDefaultProfilePicture(Bitmap inputBitmap)
The ProfilePictureView will display the provided image while the specified profile is being loaded, or if the specified profile is not available.
Parameters:
inputBitmap
- The bitmap to render until the actual profile is loaded.onMeasure
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
Overriding onMeasure to handle the case where WRAP_CONTENT might be specified in the layout. Since we don't know the dimensions of the profile photo, we need to handle this case specifically.
The approach is to default to a NORMAL sized amount of space in the case that a preset size is not specified. This logic is applied to both width and height
onLayout
protected void onLayout(boolean changed, int left, int top, int right, int bottom)
In addition to calling super.Layout(), we also attempt to get a new image that is properly sized for the layout dimensions
onSaveInstanceState
protected Parcelable onSaveInstanceState()
Some of the current state is returned as a Bundle to allow quick restoration of the ProfilePictureView object in scenarios like orientation changes.
Returns:
a Parcelable containing the current state
onRestoreInstanceState
protected void onRestoreInstanceState(Parcelable state)
If the passed in state is a Bundle, an attempt is made to restore from it.
Parameters:
state
- a Parcelable containing the current stateonDetachedFromWindow
protected void onDetachedFromWindow()