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) | ||||||||||
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 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
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
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. |
---|
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. |
This method will be invoked when a new page becomes selected. Animation is not necessarily complete.
position | Position index of the new selected page. |
---|
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 |
---|