-
Notifications
You must be signed in to change notification settings - Fork 1
Attributes and methods
AlekSt7 edited this page Nov 7, 2021
·
11 revisions
This library has many attributes for customizing via XML. Here is a list of XML attrs:
For a simple understanding of the customization attributes, I depicted the structure of the RXColorWheel elements
/** Interface definition for a callback which to be invoked when the color changes. */
interface ColorChagneListener{
/**
* Called when the color changes.
*
* @param color The current color.
*/
void onColorChanged(int color);
/**
* Called when the view was rendered for the first time.
*
* @param color The current color.
*/
void firstDraw(int color);
}
/** Interface definition for a callback which to be invoked when the buttons are pressed. */
interface ButtonTouchListener{
void on_cPointerTouch();
void on_excPointerTouch();
}
/** Interface definition for a callback which to be invoked when switching a step of stepper mode to the next value. */
interface StepperListener{
void onStep();
}
Method | Definition |
---|---|
boolean setColor(int color) |
Sets color on color wheel. Returns true if the passed color is in the color gamut of the color ring. |
void setButtonTouchListener(@NonNull ButtonTouchListener listener) |
A callback method that takes an implementation of the ButtonTouchListener interface |
void setColorChangeListener(@NonNull ColorChagneListener listener) |
A callback method that takes an implementation of the ColorChangeListener interface |
void setStepperListener(@NonNull StepperListener listener) |
A callback method that takes an implementation of the StepperListener interface |
void setColorPalette(int colors[]) |
Sets the color palette on color ring |
void setIsColorPointer(boolean isColorPointer) |
Sets the isColorPointer |
void setColorPointerCustomColor(int color) |
Sets the colorPointerCustomColor |
void setColorPointerCustomColor(String color) |
Sets the colorPointerCustomColor |
void setIsColorPointerCustomColor(boolean isColorPointerCustomColor) |
Sets default color of color pointer, if the passed value is true, sets the value of an attribute isColorPointerCustomColor |
void setPointerCustomColor(int color) |
Sets the pointerCustomColor |
void setPointerCustomColor(String color) |
Sets the pointerCustomColor |
void setIsPointerCustomColor(boolean isPointerCustomColor) |
Sets default color of pointer, if the passed value is true, sets the value of an attribute isPointerCustomColor |
void setColorPointerRadius(float colorPointerRadius) |
Sets the colorPointerRad |
void setIsBadge(boolean isBadge) |
Sets the isBadge |
void setIsRoundBadge(boolean isRoundBadge) |
Sets the isRoundBadge |
void setBadgeSize(float badge_size) |
Sets the badgeSize |
void setImageBitmap(Bitmap bitmap) |
Sets the bitmap of image use by badge |
void setImageById(Context context, int drawableId) |
Sets the image by drawable id use by badge |
void setIsExColorPointer(boolean isExColorPointer) |
Sets the isExColorPointer |
void setExColorPointerRadius(float ExColorPointerRadius) |
Sets the excPointerRad |
void setBackgroundColor(int color) |
Sets the bgColor |
void setIsBackground(boolean background) |
Sets the isBackgorund |
void setIsPointerLine(boolean isPointerLine) |
Sets the isPointerLine |
void setIsPointerShadow(boolean isPointerShadow) |
Sets the isPointerShadow |
void setIsPlacemarks(boolean isPlacemarks) |
Sets the isPlacemarks |
void setIsPlacemarksRound(boolean isPlacemarksRound) |
Sets the isPlacemarksRound |
void setPlacemarksCount(int count) |
Sets the placemarksCount |
void setColorRingRadius(float colorRingRadius) |
Sets the colorRingRad |
void setColorRingThickness(float colorRingThickness) |
Sets the colorRingThickness |
void setIsColorPointerShadow(boolean isColorPointerShadow) |
Sets the isColorPointerShadow |
void setPointerRadius(float pointerRadius) |
Sets the pointerRad |
void setIsPointerOutline(boolean isPointerOutline) |
Sets the isPointerOutline |
void setStepperMode(boolean stepperMode) |
Sets the stepperMode |
int[] getColor_palette() |
Returns the color palette used by color ring |
boolean getIsColorPointer() |
Returns the isColorPointer |
boolean getIsColorPointerCustomColor() |
Returns the isColorPointerCustomColor |
int getColorPointerCustomColor() |
Returns the colorPointerCustomColor |
boolean getIsPointerCustomColor() |
Returns isPointerCustomColor |
int getPointerCustomColor() |
Returns the pointerCustomColor |
float getColorPointerRadius() |
Returns the colorPointerRad |
boolean getIsBadge() |
Returns the isBadge |
boolean getIsRoundBadge() |
Returns the isRoundBadge |
float getBadgeSize() |
Returns the badgeSize |
Bitmap getImageBitmap() |
Returns the bitmap of the image used by the badge |
boolean getIsExColorPointer() |
Returns the isExColorPointer |
float getExColoPointerRadius() |
Returns the excPointerRad |
int getBackgroundColor() |
Returns the bgColor |
boolean getIsBackground() |
Returns the isBackgorund |
boolean getIsPointerLine() |
Returns the isPointerLine |
boolean getIsPointerShadow() |
Returns the isPointerShadow |
boolean getIsPlacemarks() |
Returns the isPlacemarks |
boolean getIsPlacemarksRound() |
Returns the isPlacemarksRound |
int getPlacemarksCount() |
Returns the placemarksCount |
float getColorRingRadius() |
Returns the colorRingRad |
float getColorRingThickness() |
Returns the colorRingThickness |
boolean getIsColorPointerShadow() |
Returns the isColorPointerShadow |
float getPointerRadius() |
Returns the pointerRad |
boolean getIsPointerOutline() |
Returns the isPointerOutline |
boolean getStepperMode() |
Returns the stepperMode |