public class

GalleryImagePickerFragment

extends BaseImagePickerFragment
java.lang.Object
   ↳ androidx.fragment.app.Fragment
     ↳ com.pspdfkit.document.image.BaseImagePickerFragment
       ↳ com.pspdfkit.document.image.GalleryImagePickerFragment

Class Overview

Fragment used for picking up the image from gallery / filesystem.

Summary

[Expand]
Inherited Fields
From class com.pspdfkit.document.image.BaseImagePickerFragment
Public Constructors
GalleryImagePickerFragment()
Public Methods
int getRequestCode()
Gets request code to be given to the intent when starting image picker activity for result.
void onCreate(Bundle savedInstanceState)
Protected Methods
Intent getImagePickerIntent()
Creates an intent to start image picking activity, an image gallery or a camera.
void onImagePickerResult(int resultCode, Intent data)
Called when image picker gets result from the activity it started, whether camera or image picker.
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
From class com.pspdfkit.document.image.BaseImagePickerFragment
From class androidx.fragment.app.Fragment
From class java.lang.Object
From interface android.content.ComponentCallbacks
From interface android.view.View.OnCreateContextMenuListener
From interface androidx.lifecycle.LifecycleOwner
From interface androidx.lifecycle.ViewModelStoreOwner

Public Constructors

public GalleryImagePickerFragment ()

Public Methods

public int getRequestCode ()

Gets request code to be given to the intent when starting image picker activity for result.

Returns
  • Request code for the fragment.

public void onCreate (Bundle savedInstanceState)

Protected Methods

protected Intent getImagePickerIntent ()

Creates an intent to start image picking activity, an image gallery or a camera.

Returns
  • Image picking activity intent.

protected void onImagePickerResult (int resultCode, Intent data)

Called when image picker gets result from the activity it started, whether camera or image picker.

Parameters
resultCode Result code received from the activity.
data Received data.

protected void queueStartActivityForResult (Intent intent)

Start activity for result with a given intent, or queues it up if the fragment is still not active.

Parameters
intent Intent to be fired.