public class

FavoriteColorDialogFragment

extends CustomSizeDialogFragment
java.lang.Object
   ↳ DialogFragment
     ↳ com.pdftron.pdf.controls.CustomSizeDialogFragment
       ↳ com.pdftron.pdf.controls.FavoriteColorDialogFragment

Class Overview

A DialogFragment for adding/ editing colors to Favorites. It contains two pages: a standard color pages contains recent colors and standard preset colors; And a AdvancedColorView page. The favorite colors will be displayed in CustomColorPickerView

Summary

Nested Classes
@interface FavoriteColorDialogFragment.FavoriteDialogMode  
interface FavoriteColorDialogFragment.OnEditFinishedListener This interface is for listening whether editing favorites is finished event  
Constants
int ADD_COLOR The favorite color mode will be adding colors to favorites
int EDIT_COLOR The favorite color mode will be editing selected color in favorites
String FAVORITE_DIALOG_MODE The key in #getArguments() for getting dialog mode value
Public Constructors
FavoriteColorDialogFragment()
Class constructor
Public Methods
void dismiss()
Dismiss this favorite dialog
ArrayList<String> getSelectedColors()
Gets selected favorite colors
static FavoriteColorDialogFragment newInstance(Bundle bundle)
Creates a new instance of favorite dialog mode
Dialog onCreateDialog(Bundle savedInstanceState)
View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
void onPageScrollStateChanged(int state)
Called when the scroll state changes.
void onPageScrolled(int position, float positionOffset, int positionOffsetPixels)
This method is invoked when pager is scrolled.
void onPageSelected(int position)
This method will be invoked when a new page becomes selected.
void onSaveInstanceState(Bundle outState)
void onTabReselected(TabLayout.Tab tab)
Called when a tab that is already selected is chosen again by the user.
void onTabSelected(TabLayout.Tab tab)
Called when a tab enters the selected state.
void onTabUnselected(TabLayout.Tab tab)
Called when a tab exits the selected state.
void setOnEditFinishedListener(FavoriteColorDialogFragment.OnEditFinishedListener listener)
Sets on finish editing favorite colors listener
void setSelectedColor(int color)
Sets selected color for advanced color picker
[Expand]
Inherited Methods
From class com.pdftron.pdf.controls.CustomSizeDialogFragment
From class java.lang.Object

Constants

public static final int ADD_COLOR

The favorite color mode will be adding colors to favorites

Constant Value: 0 (0x00000000)

public static final int EDIT_COLOR

The favorite color mode will be editing selected color in favorites

Constant Value: 1 (0x00000001)

public static final String FAVORITE_DIALOG_MODE

The key in #getArguments() for getting dialog mode value

Constant Value: "favDialogMode"

Public Constructors

public FavoriteColorDialogFragment ()

Class constructor

Public Methods

public void dismiss ()

Dismiss this favorite dialog

public ArrayList<String> getSelectedColors ()

Gets selected favorite colors

public static FavoriteColorDialogFragment newInstance (Bundle bundle)

Creates a new instance of favorite dialog mode

public Dialog onCreateDialog (Bundle savedInstanceState)

public View onCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)

public void onPageScrollStateChanged (int state)

Called when the scroll state changes. Useful for discovering when the user begins dragging, when the pager is automatically settling to the current page, or when it is fully stopped/idle.

Parameters
state The new scroll state.

public void onPageScrolled (int position, float positionOffset, int positionOffsetPixels)

This method is invoked when pager is scrolled.

Parameters
position Position index of the first page currently being displayed. Page position+1 will be visible if positionOffset is nonzero.
positionOffset Value from [0, 1) indicating the offset from the page at position.
positionOffsetPixels Value in pixels indicating the offset from position.

public void onPageSelected (int position)

This method will be invoked when a new page becomes selected. Animation is not necessarily complete.

Parameters
position Position index of the new selected page.

public void onSaveInstanceState (Bundle outState)

public void onTabReselected (TabLayout.Tab tab)

Called when a tab that is already selected is chosen again by the user. Some applications may use this action to return to the top level of a category.

Parameters
tab The tab that was reselected.

public void onTabSelected (TabLayout.Tab tab)

Called when a tab enters the selected state.

Parameters
tab The tab that was selected

public void onTabUnselected (TabLayout.Tab tab)

Called when a tab exits the selected state.

Parameters
tab The tab that was unselected

public void setOnEditFinishedListener (FavoriteColorDialogFragment.OnEditFinishedListener listener)

Sets on finish editing favorite colors listener

Parameters
listener finished editing favorite color listener

public void setSelectedColor (int color)

Sets selected color for advanced color picker

Parameters
color the color