java.lang.Object | |||
↳ | DialogFragment | ||
↳ | com.pdftron.pdf.dialog.base.BaseBottomDialogFragment | ||
↳ | com.pdftron.pdf.controls.AnnotStyleDialogFragment |
![]() |
Annotation style dialog fragment is a DialogFragment that shows annotation style properties in a bottom sheet. With the style dialog, users can edit annotation styles easily with style presets as well as choosing their own colors through the advanced color picker. The style dialog also provides a recent and a favorite list for quick access.
You can show annotation style dialog as follows:
AnnotStyle annotStyle = new AnnotStyle(); // set annotation type to annot Style annotStyle.setAnnotType(Annot.e_Square); // set blue stroke, yellow fill color, thickness 5, opacity 0.8 to annotation style annotStyle.setStyle(Color.BLUE, Color.YELLOW, 5, 0.8); AnnotStyleDialogFragment annotStyleDialog = AnnotStyleDialogFragment.Builder(annotStyle).build(); annotStyleDialog.show(getActivity().getSupportFragmentManager());
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
class | AnnotStyleDialogFragment.Builder | Builder for building annotation style dialog | |||||||||
@interface | AnnotStyleDialogFragment.SelectColorMode | Selected color mode for color picker view |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | COLOR | The selected color is the color of annotation obtained from getColorAsRGB()
|
|||||||||
int | FILL_COLOR | The selected color is the fill color of annotation. | |||||||||
int | STROKE_COLOR | The selected color is the stroke color of annotation. | |||||||||
int | TEXT_COLOR | The selected color is the text color of FreeText annotation. |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
public static final String | TAG |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
AnnotStyleDialogFragment() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
dismiss(boolean waitBottomSheet)
Dismiss the dialog
| ||||||||||
void |
dismiss()
Dismiss the dialog
| ||||||||||
AnnotationPropertyPreviewView |
getAnnotPreview()
Abstract method for getting annotation style preview view
| ||||||||||
AnnotStyle |
getAnnotStyle()
Overload implementation of
getAnnotStyle()
Gets annotation style | ||||||||||
static AnnotStyleDialogFragment |
newInstance()
Creates a new instance of AnnotStyleDialogFragment
| ||||||||||
void |
onCreate(Bundle savedInstanceState)
Overload implementation of
onCreate(Bundle) | ||||||||||
View |
onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
Overload implementation of DialogFragment#onCreateView(LayoutInflater, ViewGroup, Bundle)
| ||||||||||
void |
onPresetDeselected(AnnotStyle presetStyle)
Overload implementation of
onPresetDeselected(AnnotStyle) | ||||||||||
void |
onPresetSelected(AnnotStyle presetStyle)
Overload implementation of
onPresetSelected(AnnotStyle) | ||||||||||
void |
onSaveInstanceState(Bundle outState)
Overload implementation of
onSaveInstanceState(Bundle) | ||||||||||
void |
onViewStateRestored(Bundle savedInstanceState)
Overload implementation of
onViewStateRestored(Bundle) | ||||||||||
void |
saveAnnotStyles()
Saves annotation styles to settings
| ||||||||||
void |
setAnnotPreviewVisibility(int visibility)
Abstract method for setting annotation style preview visibility
| ||||||||||
void | setAnnotStyle(AnnotStyle annotStyle) | ||||||||||
void |
setAnnotStyleProperties(HashMap<Integer, AnnotStyleProperty> annotStyleProperties)
Sets the AnnotStyleProperties that will be used to hide elements of the AnnotStyleDialog.
| ||||||||||
void | setCanShowPressureSwitch(boolean canShow) | ||||||||||
void | setCanShowRichContentSwitch(boolean canShow) | ||||||||||
void |
setOnAnnotStyleChangeListener(AnnotStyle.OnAnnotStyleChangeListener listener)
Sets Annotation style change listener.
| ||||||||||
void |
setOnMoreAnnotTypesClickListener(AnnotStyleView.OnMoreAnnotTypeClickedListener listener)
Sets more annot types row item click event listener
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
The selected color is the color of annotation obtained from getColorAsRGB()
The selected color is the fill color of annotation.
The selected color is the stroke color of annotation.
The selected color is the text color of FreeText
annotation.
Dismiss the dialog
waitBottomSheet | whether to wait for bottom sheet to collapse. |
---|
Dismiss the dialog
Abstract method for getting annotation style preview view
Overload implementation of getAnnotStyle()
Gets annotation style
Creates a new instance of AnnotStyleDialogFragment
Overload implementation of onCreate(Bundle)
savedInstanceState | If the fragment is being re-created from a previous saved state, this is the state. |
---|
Overload implementation of DialogFragment#onCreateView(LayoutInflater, ViewGroup, Bundle)
Overload implementation of onPresetDeselected(AnnotStyle)
presetStyle | presetStyle |
---|
Overload implementation of onPresetSelected(AnnotStyle)
presetStyle | presetStyle |
---|
Overload implementation of onSaveInstanceState(Bundle)
outState | Bundle in which to place your saved state. |
---|
Overload implementation of onViewStateRestored(Bundle)
savedInstanceState | If the fragment is being re-created from a previous saved state, this is the state. |
---|
Saves annotation styles to settings
Abstract method for setting annotation style preview visibility
Sets the AnnotStyleProperties that will be used to hide elements of the AnnotStyleDialog.
annotStyleProperties | hash map of annot types and the AnnotStyleProperties |
---|
Sets Annotation style change listener.
listener | annotation style change listener |
---|
Sets more annot types row item click event listener
listener | The listener |
---|