public class ColorPickerDialog
extends android.support.v4.app.DialogFragment
Modifier and Type | Class and Description |
---|---|
static interface |
ColorPickerDialog.ColorPickerListener
Listener for color selected in color picker
|
Constructor and Description |
---|
ColorPickerDialog() |
Modifier and Type | Method and Description |
---|---|
int |
getSelectedColor()
Getter
|
boolean |
isShowing()
Getter
|
static ColorPickerDialog |
newInstance(int title,
int[] colors,
int selectedColor,
int columnNumber)
Allows to create a new instance of the dialog
|
void |
onCreate(Bundle savedInstanceState) |
Dialog |
onCreateDialog(Bundle savedInstanceState) |
void |
setColorPickerListener(ColorPickerDialog.ColorPickerListener listener)
Setter
|
void |
setSelectedColor(int selectedColor)
Setter
|
dismiss, dismissAllowingStateLoss, getDialog, getLayoutInflater, getShowsDialog, getTheme, isCancelable, onActivityCreated, onAttach, onCancel, onDestroyView, onDetach, onDismiss, onSaveInstanceState, onStart, onStop, setCancelable, setShowsDialog, setStyle, setupDialog, show, show
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLoaderManager, getParentFragment, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, hashCode, hasOptionsMenu, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isMenuVisible, isRemoving, isResumed, isVisible, onActivityResult, onAttach, onConfigurationChanged, onContextItemSelected, onCreateAnimation, onCreateContextMenu, onCreateOptionsMenu, onCreateView, onDestroy, onDestroyOptionsMenu, onHiddenChanged, onInflate, onInflate, onLowMemory, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPrepareOptionsMenu, onRequestPermissionsResult, onResume, onViewCreated, onViewStateRestored, registerForContextMenu, requestPermissions, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivity, startActivityForResult, startActivityForResult, toString, unregisterForContextMenu
public static ColorPickerDialog newInstance(int title, int[] colors, int selectedColor, int columnNumber)
title
- the dialog titlecolors
- the dialog optionsselectedColor
- the first selected optioncolumnNumber
- the number of columns in which the options are placedpublic void onCreate(Bundle savedInstanceState)
onCreate
in class android.support.v4.app.DialogFragment
@NonNull public Dialog onCreateDialog(Bundle savedInstanceState)
onCreateDialog
in class android.support.v4.app.DialogFragment
public void setColorPickerListener(ColorPickerDialog.ColorPickerListener listener)
listener
- the listener for the color pickerpublic void setSelectedColor(int selectedColor)
selectedColor
- the new selected color resource IDpublic int getSelectedColor()
public boolean isShowing()