public class

FavoriteColorDialogFragment

extends DialogFragment
java.lang.Object
   ↳ DialogFragment
     ↳ 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)
The overload implementation of DialogFragment#onCreateDialog(Bundle)
View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
The overload implementation of DialogFragment#onCreateView(LayoutInflater, ViewGroup, Bundle)
void onPageScrollStateChanged(int state)
The overload implementation of ViewPager.OnPageChangeListener#onPageSelected(int).
void onPageScrolled(int position, float positionOffset, int positionOffsetPixels)
The overload implementation of ViewPager.OnPageChangeListener#onPageScrolled(int, float, int).
void onPageSelected(int position)
The overload implementation of ViewPager.OnPageChangeListener#onPageSelected(int).
void onSaveInstanceState(Bundle outState)
The overload implementation of DialogFragment#onSaveInstanceState(Bundle)
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 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)

The overload implementation of DialogFragment#onCreateDialog(Bundle)

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

The overload implementation of DialogFragment#onCreateView(LayoutInflater, ViewGroup, Bundle)

public void onPageScrollStateChanged (int state)

The overload implementation of ViewPager.OnPageChangeListener#onPageSelected(int).

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)

The overload implementation of ViewPager.OnPageChangeListener#onPageScrolled(int, float, int).

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)

The overload implementation of ViewPager.OnPageChangeListener#onPageSelected(int).

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)

The overload implementation of DialogFragment#onSaveInstanceState(Bundle)

Parameters
outState Bundle in which to place your saved state.

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