java.lang.Object | |||
↳ | DialogFragment | ||
↳ | com.pdftron.pdf.controls.CustomSizeDialogFragment | ||
↳ | com.pdftron.pdf.controls.FavoriteColorDialogFragment |
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
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 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
The favorite color mode will be adding colors to favorites
The favorite color mode will be editing selected color in favorites
The key in #getArguments() for getting dialog mode value
Class constructor
Dismiss this favorite dialog
Gets selected favorite colors
Creates a new instance of favorite dialog mode
The overload implementation of DialogFragment#onCreateDialog(Bundle)
The overload implementation of DialogFragment#onCreateView(LayoutInflater, ViewGroup, Bundle)
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.
state | The new scroll state. |
---|
The overload implementation of ViewPager.OnPageChangeListener#onPageScrolled(int, float, int).
This method is invoked when pager is scrolled.
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. |
The overload implementation of ViewPager.OnPageChangeListener#onPageSelected(int).
This method will be invoked when a new page becomes selected. Animation is not necessarily complete.
position | Position index of the new selected page. |
---|
The overload implementation of DialogFragment#onSaveInstanceState(Bundle)
outState | Bundle in which to place your saved state. |
---|
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.
tab | The tab that was reselected. |
---|
Called when a tab enters the selected state.
tab | The tab that was selected |
---|
Called when a tab exits the selected state.
tab | The tab that was unselected |
---|
Sets on finish editing favorite colors listener
listener | finished editing favorite color listener |
---|
Sets selected color for advanced color picker
color | the color |
---|