Package com.pspdfkit.ui
Class AnnotationCreatorInputDialogFragment
-
- All Implemented Interfaces:
-
android.content.ComponentCallbacks
,android.content.DialogInterface.OnCancelListener
,android.content.DialogInterface.OnDismissListener
,android.view.View.OnCreateContextMenuListener
,androidx.activity.result.ActivityResultCaller
,androidx.lifecycle.HasDefaultViewModelProviderFactory
,androidx.lifecycle.LifecycleOwner
,androidx.lifecycle.ViewModelStoreOwner
,androidx.savedstate.SavedStateRegistryOwner
public class AnnotationCreatorInputDialogFragment extends DialogFragment
AnnotationCreatorInputDialogFragment facilitates setting the annotation creator.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
AnnotationCreatorInputDialogFragment.OnAnnotationCreatorSetListener
This listener interface needs to be implemented by any class that wishes to handle AnnotationCreatorInputDialogFragment specific dialog events.
-
Constructor Summary
Constructors Constructor Description AnnotationCreatorInputDialogFragment()
Default constructor, do not call this constructor directly, unless you know what you are doing.
-
Method Summary
Modifier and Type Method Description static void
show(@NonNull() FragmentManager manager, @Nullable() String creatorSuggestion, @NonNull() AnnotationCreatorInputDialogFragment.OnAnnotationCreatorSetListener onAnnotationCreatorSetListener)
Shows the AnnotationCreatorInputDialogFragment
.static void
hide(@NonNull() FragmentManager manager)
Hides the AnnotationCreatorInputDialogFragment
.void
onCreate(@Nullable() Bundle savedInstanceState)
Dialog
onCreateDialog(Bundle savedInstanceState)
void
onSaveInstanceState(@NonNull() Bundle outState)
void
onViewCreated(@NonNull() View view, @Nullable() Bundle savedInstanceState)
void
onResume()
String
getSuggestedCreator()
Obtains the suggested creator from the arguments Bundle. void
setOnAnnotationCreatorSetListener(@Nullable() AnnotationCreatorInputDialogFragment.OnAnnotationCreatorSetListener onAnnotationCreatorSetListener)
Sets a listener, that receives dialog related events. -
-
Method Detail
-
show
static void show(@NonNull() FragmentManager manager, @Nullable() String creatorSuggestion, @NonNull() AnnotationCreatorInputDialogFragment.OnAnnotationCreatorSetListener onAnnotationCreatorSetListener)
Shows the
AnnotationCreatorInputDialogFragment
. Will always attempt to obtain an existing instance.- Parameters:
manager
- The FragmentManager to use.creatorSuggestion
- Optional parameter: a creator suggestion that is displayed as the default value inside the input field.onAnnotationCreatorSetListener
- A listener that gets informed when the user sets or cancels setting a creator.
-
hide
static void hide(@NonNull() FragmentManager manager)
Hides the
AnnotationCreatorInputDialogFragment
.- Parameters:
manager
- The FragmentManager to use.
-
onCreateDialog
@NonNull() Dialog onCreateDialog(Bundle savedInstanceState)
-
onSaveInstanceState
void onSaveInstanceState(@NonNull() Bundle outState)
-
onViewCreated
void onViewCreated(@NonNull() View view, @Nullable() Bundle savedInstanceState)
-
onResume
void onResume()
-
getSuggestedCreator
@Nullable() String getSuggestedCreator()
Obtains the suggested creator from the arguments Bundle.
- Returns:
The suggested creator, that was passed to this fragment.
-
setOnAnnotationCreatorSetListener
void setOnAnnotationCreatorSetListener(@Nullable() AnnotationCreatorInputDialogFragment.OnAnnotationCreatorSetListener onAnnotationCreatorSetListener)
Sets a listener, that receives dialog related events. Calling this method will replace any previously set listener. You may provide
null
to clear the listener.- Parameters:
onAnnotationCreatorSetListener
- OnAnnotationCreatorSetListener that should be notified, ornull
to clear the listener.
-
-
-
-