java.lang.Object | |||
↳ | DialogFragment | ||
↳ | com.pdftron.pdf.dialog.base.BaseBottomDialogFragment | ||
↳ | com.pdftron.pdf.controls.AnnotStyleDialogFragment |
Known Direct Subclasses |
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 = new 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 | |||||||||
@interface | AnnotStyleDialogFragment.SelectStyleMode | Selected style mode for style picker view | |||||||||
class | AnnotStyleDialogFragment.Theme |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | BORDER_STYLE | The selected style is the border style of annotation. | |||||||||
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 | LINE_END_STYLE | The selected style is the line ending style of annotation. | |||||||||
int | LINE_START_STYLE | The selected style is the line starting style of annotation. | |||||||||
int | LINE_STYLE | The selected style is the line style 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()
Dismiss the dialog
| ||||||||||
void |
dismiss(boolean waitBottomSheet)
Wrapper for dismiss where it will check lifecycle on the fragment to prevent crash when
dismissing while backgrounded
| ||||||||||
AnnotationPropertyPreviewView |
getAnnotPreview()
Abstract method for getting current annotation style preview view
| ||||||||||
SparseArray<AnnotationPropertyPreviewView> |
getAnnotPreviews()
Abstract method for getting all annotation style preview views
| ||||||||||
AnnotStyle |
getAnnotStyle()
Overload implementation of
getAnnotStyle()
Gets annotation style | ||||||||||
ArrayList<AnnotStyle> | getAnnotStyles() | ||||||||||
int | getCurrentTabIndex() | ||||||||||
static AnnotStyleDialogFragment |
newInstance()
Creates a new instance of AnnotStyleDialogFragment
| ||||||||||
void |
onAnnotStyleLayoutUpdated()
Abstract method to notify when the annot style layout has changed
| ||||||||||
void | onCreate(Bundle savedInstanceState) | ||||||||||
View | onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) | ||||||||||
void | onPageScrollStateChanged(int state) | ||||||||||
void | onPageScrolled(int position, float positionOffset, int positionOffsetPixels) | ||||||||||
void | onPageSelected(int position) | ||||||||||
void |
onPresetDeselected(AnnotStyle presetStyle)
Overload implementation of
onPresetDeselected(AnnotStyle) | ||||||||||
void |
onPresetSelected(AnnotStyle presetStyle)
Overload implementation of
onPresetSelected(AnnotStyle) | ||||||||||
void | onSaveInstanceState(Bundle outState) | ||||||||||
void | onViewStateRestored(Bundle savedInstanceState) | ||||||||||
void |
saveAnnotStyles()
Saves annotation styles to settings
| ||||||||||
void |
setAnnotPreviewVisibility(int visibility)
Abstract method for setting annotation style preview visibility
| ||||||||||
void | setAnnotStyle(int tabIndex, AnnotStyle annotStyle) | ||||||||||
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(int tabIndex, boolean canShow) | ||||||||||
void | setCanShowPressureSwitch(boolean canShow) | ||||||||||
void | setCanShowRichContentSwitch(int tabIndex, boolean canShow) | ||||||||||
void | setCanShowRichContentSwitch(boolean canShow) | ||||||||||
void |
setCanShowTextAlignment(boolean canShowTextAlignment)
Sets whether to show text alignment in the annot style dialog
| ||||||||||
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 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.pdftron.pdf.dialog.base.BaseBottomDialogFragment
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
com.pdftron.pdf.controls.AnnotStyleView.OnPresetSelectedListener
| |||||||||||
From interface
com.pdftron.pdf.model.AnnotStyle.AnnotStyleHolder
|
The selected style is the border style of annotation.
The selected color is the color of annotation obtained from getColorAsRGB()
The selected color is the fill color of annotation.
The selected style is the line ending style of annotation.
The selected style is the line starting style of annotation.
The selected style is the line style of annotation.
The selected color is the stroke color of annotation.
The selected color is the text color of FreeText
annotation.
Dismiss the dialog
Wrapper for dismiss where it will check lifecycle on the fragment to prevent crash when dismissing while backgrounded
waitBottomSheet | whether to wait for bottom sheet to collapse. |
---|
Abstract method for getting current annotation style preview view
Abstract method for getting all annotation style preview views
Overload implementation of getAnnotStyle()
Gets annotation style
Creates a new instance of AnnotStyleDialogFragment
Abstract method to notify when the annot style layout has changed
Overload implementation of onPresetDeselected(AnnotStyle)
presetStyle | presetStyle |
---|
Overload implementation of onPresetSelected(AnnotStyle)
presetStyle | presetStyle |
---|
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 whether to show text alignment in the annot style dialog
Sets Annotation style change listener.
listener | annotation style change listener |
---|
Sets more annot types row item click event listener
listener | The listener |
---|