public class

ColorPickerView

extends LinearLayout
implements CustomColorPickerView.OnEditFavoriteColorListener
java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ android.widget.LinearLayout
         ↳ com.pdftron.pdf.controls.ColorPickerView

Class Overview

A Linear layout for changing annotation color. It contains a annotation preview and three pages: CustomColorPickerView, PresetColorGridView, and AdvancedColorView.

Summary

Nested Classes
interface ColorPickerView.OnBackButtonPressedListener This method is used for back button in toolbar pressed event  
interface ColorPickerView.OnColorChangeListener A interface that is invoked when there is color changes in color picker pages  
[Expand]
Inherited Constants
From class android.widget.LinearLayout
From class android.view.ViewGroup
From class android.view.View
[Expand]
Inherited Fields
From class android.view.View
Public Constructors
ColorPickerView(Context context)
Class constructor
ColorPickerView(Context context, AttributeSet attrs)
Class constructor
ColorPickerView(Context context, AttributeSet attrs, int defStyleAttr)
Class constructor
Public Methods
void dismiss()
Hide Color picker view
void onEditFavoriteColorDismissed()
Overload implementation of onEditFavoriteColorDismissed() (int)}
void onEditFavoriteItemSelected(int selectedCount)
Overload implementation of onEditFavoriteItemSelected(int)
void saveColors()
Save colors in custom color view to settings
void setActivity(FragmentActivity activity)
Sets activity to custom color view to show FavoriteColorDialogFragment fragment when clicked in "Add favorite" button.
void setAnnotStyleHolder(AnnotStyle.AnnotStyleHolder annotStyleHolder)
Sets annotation style holder
void setAnnotStyleProperties(HashMap<Integer, AnnotStyleProperty> annotStyleProperties)
Sets the AnnotStyleProperties that will be used to hide elements of the AnnotStyleDialog.
void setIsDialogLayout(boolean isDialogLayout)
void setOnBackButtonPressedListener(ColorPickerView.OnBackButtonPressedListener listener)
Sets on back button pressed listener
void setSelectedColor(int color)
Sets selected color.
void show(int colorMode)
Show color picker view with given colorMode, must be one of: STROKE_COLOR, FILL_COLOR, TEXT_COLOR, COLOR
[Expand]
Inherited Methods
From class android.widget.LinearLayout
From class android.view.ViewGroup
From class android.view.View
From class java.lang.Object
From interface android.graphics.drawable.Drawable.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.ViewManager
From interface android.view.ViewParent
From interface android.view.accessibility.AccessibilityEventSource
From interface com.pdftron.pdf.controls.CustomColorPickerView.OnEditFavoriteColorListener

Public Constructors

public ColorPickerView (Context context)

Class constructor

public ColorPickerView (Context context, AttributeSet attrs)

Class constructor

public ColorPickerView (Context context, AttributeSet attrs, int defStyleAttr)

Class constructor

Public Methods

public void dismiss ()

Hide Color picker view

public void onEditFavoriteColorDismissed ()

Overload implementation of onEditFavoriteColorDismissed() (int)}

public void onEditFavoriteItemSelected (int selectedCount)

Overload implementation of onEditFavoriteItemSelected(int)

Parameters
selectedCount selected favorite color count

public void saveColors ()

Save colors in custom color view to settings

public void setActivity (FragmentActivity activity)

Sets activity to custom color view to show FavoriteColorDialogFragment fragment when clicked in "Add favorite" button.

Parameters
activity the activity

public void setAnnotStyleHolder (AnnotStyle.AnnotStyleHolder annotStyleHolder)

Sets annotation style holder

Parameters
annotStyleHolder annotation style holder

public void setAnnotStyleProperties (HashMap<Integer, AnnotStyleProperty> annotStyleProperties)

Sets the AnnotStyleProperties that will be used to hide elements of the AnnotStyleDialog.

Parameters
annotStyleProperties hash map of annot types and the AnnotStyleProperties

public void setIsDialogLayout (boolean isDialogLayout)

public void setOnBackButtonPressedListener (ColorPickerView.OnBackButtonPressedListener listener)

Sets on back button pressed listener

Parameters
listener back button pressed listener

public void setSelectedColor (int color)

Sets selected color. If selected color matches any of the color grids, it will show white check mark.

Parameters
color color

public void show (int colorMode)

Show color picker view with given colorMode, must be one of: STROKE_COLOR, FILL_COLOR, TEXT_COLOR, COLOR

Parameters
colorMode color mode