java.lang.Object | ||
↳ | androidx.fragment.app.Fragment | |
↳ | com.pspdfkit.document.image.BaseImagePickerFragment |
![]() |
Base fragment for image picker implementations.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
protected BaseImagePickerFragment.ActivityResult | lastActivityResult | Holds last activity result when no listener is registered. | |||||||||
protected ImagePicker.OnImagePickedListener | onImagePickedListener | Currently set listener for image picking process (if any). | |||||||||
protected Intent | pendingIntentForResult | Intent that will get executed when this fragment is added to activity. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
BaseImagePickerFragment() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
finish()
Remove the fragment from its owning activity.
| ||||||||||
void | onActivityResult(int requestCode, int resultCode, Intent data) | ||||||||||
void | onCreate(Bundle savedInstanceState) | ||||||||||
void | onSaveInstanceState(Bundle outState) | ||||||||||
void |
setOnImagePickedListener(ImagePicker.OnImagePickedListener onImagePickedListener)
Sets on image picked listener.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract Intent |
getImagePickerIntent()
Creates an intent to start image picking activity, an image gallery or a camera.
| ||||||||||
abstract int |
getRequestCode()
Gets request code to be given to the intent when starting image picker activity for result.
| ||||||||||
abstract void |
onImagePickerResult(int resultCode, Intent data)
Called when image picker gets result from the activity it started, whether camera or image picker.
| ||||||||||
abstract void |
queueStartActivityForResult(Intent intent)
Start activity for result with a given intent, or queues it up if the fragment is still not active.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Holds last activity result when no listener is registered.
Currently set listener for image picking process (if any).
Intent that will get executed when this fragment is added to activity.
Remove the fragment from its owning activity.
Sets on image picked listener.
Calling this method will replace any previously set listener.
You may provide null
to clear the listener.
onImagePickedListener | ImagePicker.OnImagePickedListener that should be notified, or null to clear the listener.
|
---|
Creates an intent to start image picking activity, an image gallery or a camera.
Gets request code to be given to the intent when starting image picker activity for result.
Called when image picker gets result from the activity it started, whether camera or image picker.
resultCode | Result code received from the activity. |
---|---|
data | Received data. |
Start activity for result with a given intent, or queues it up if the fragment is still not active.
intent | Intent to be fired. |
---|