- getBackground() - Method in class com.addisonelliott.segmentedbutton.SegmentedButton
-
Returns the background drawable that is shown when the button is not selected
In the case a solid color background is used, this will be a ColorDrawable
- getBackground() - Method in class com.addisonelliott.segmentedbutton.SegmentedButtonGroup
-
Returns the background drawable that is the 'global' value for each of the buttons.
- getBitmapFromVectorDrawable(Drawable) - Static method in class com.addisonelliott.segmentedbutton.SegmentedButton
-
Create a bitmap from a specified vector drawable
- getBorderColor() - Method in class com.addisonelliott.segmentedbutton.SegmentedButtonGroup
-
Return color of the border
- getBorderDashGap() - Method in class com.addisonelliott.segmentedbutton.SegmentedButtonGroup
-
Return the border gap width, in pixels
Only relevant if border dash width is greater than 0px
- getBorderDashWidth() - Method in class com.addisonelliott.segmentedbutton.SegmentedButtonGroup
-
Return the border dash width, in pixels
0px value indicates the border is solid
- getBorderWidth() - Method in class com.addisonelliott.segmentedbutton.SegmentedButtonGroup
-
Return the width of the border, in pixels
0px value indicates no border is present
- getButton(int) - Method in class com.addisonelliott.segmentedbutton.SegmentedButtonGroup
-
Get segmented button at specified index
Segmented buttons are indexed according to their order of being added to this group
- getButtons() - Method in class com.addisonelliott.segmentedbutton.SegmentedButtonGroup
-
List of segmented buttons that are attached to this button group
- getDivider() - Method in class com.addisonelliott.segmentedbutton.SegmentedButtonGroup
-
Returns divider drawable that is placed between each button in the group, value of null indicates no drawable
- getDrawable() - Method in class com.addisonelliott.segmentedbutton.SegmentedButton
-
Returns the drawable for the button or null if no drawable is set
- getDrawableGravity() - Method in class com.addisonelliott.segmentedbutton.SegmentedButton
-
Returns the gravity for the drawable
The drawable can be placed to the left, top, right, or bottom of the text via this parameter
- getDrawableHeight() - Method in class com.addisonelliott.segmentedbutton.SegmentedButton
-
Returns the drawable height in pixels
If hasDrawableHeight is false, then this value will be undefined
- getDrawablePadding() - Method in class com.addisonelliott.segmentedbutton.SegmentedButton
-
Returns the drawable padding
The drawable padding is the space between the drawable and text, in pixels.
- getDrawableTint() - Method in class com.addisonelliott.segmentedbutton.SegmentedButton
-
Tint color applied to the drawable when the button is not selected
If hasDrawableTint is false, then this value will be undefined
- getDrawableWidth() - Method in class com.addisonelliott.segmentedbutton.SegmentedButton
-
Returns the drawable width in pixels
If hasDrawableWidth is false, then this value will be undefined
- getOnPositionChangedListener() - Method in class com.addisonelliott.segmentedbutton.SegmentedButtonGroup
-
Returns the listener used for notifying position changes
- getPosition() - Method in class com.addisonelliott.segmentedbutton.SegmentedButtonGroup
-
Return the currently selected button index
If the button is currently being animated, then the position will be the old button position until the
animation is complete
- getRadius() - Method in class com.addisonelliott.segmentedbutton.SegmentedButtonGroup
-
Returns the current corner radius for this button group, in pixels
A value of 0px indicates the view is rectangular and has no rounded corners
- getRippleColor() - Method in class com.addisonelliott.segmentedbutton.SegmentedButton
-
Returns the ripple color used for displaying the ripple effect on button press
The ripple color is a tint color applied on top of the button when it is pressed
- getRippleColor() - Method in class com.addisonelliott.segmentedbutton.SegmentedButtonGroup
-
Returns the ripple color used for displaying the ripple effect on button press
The ripple color is a tint color applied on top of the button when it is pressed
- getSelectedBackground() - Method in class com.addisonelliott.segmentedbutton.SegmentedButton
-
Returns the background drawable that is shown when the button is selected
In the case a solid color background is used, this will be a ColorDrawable
- getSelectedBackground() - Method in class com.addisonelliott.segmentedbutton.SegmentedButtonGroup
-
Returns the background drawable that is the 'global' value for each of the buttons.
- getSelectedBorderColor() - Method in class com.addisonelliott.segmentedbutton.SegmentedButtonGroup
-
Return color of the border for the selected button
- getSelectedBorderDashGap() - Method in class com.addisonelliott.segmentedbutton.SegmentedButtonGroup
-
Return the border gap width for the selected button, in pixels
Only relevant if border dash width is greater than 0px
- getSelectedBorderDashWidth() - Method in class com.addisonelliott.segmentedbutton.SegmentedButtonGroup
-
Return the border dash width for the selected button, in pixels
0px value indicates the border is solid
- getSelectedBorderWidth() - Method in class com.addisonelliott.segmentedbutton.SegmentedButtonGroup
-
Return the width of the border for the selected button, in pixels
0px value indicates no border is present
- getSelectedButtonRadius() - Method in class com.addisonelliott.segmentedbutton.SegmentedButtonGroup
-
Returns the current corner radius for the selected button, in pixels
A value of 0px indicates the selected button will be rectangular and has no rounded corners
- getSelectedDrawableTint() - Method in class com.addisonelliott.segmentedbutton.SegmentedButton
-
Tint color applied to the drawable when the button is selected
If hasSelectedDrawableTint is false, then this value will be undefined
- getSelectedTextColor() - Method in class com.addisonelliott.segmentedbutton.SegmentedButton
-
Returns the text color when the button is selected
If hasSelectedTextColor is false, then this returned value is undefined
- getSelectedTextTypeface() - Method in class com.addisonelliott.segmentedbutton.SegmentedButton
-
Return the current selected typeface used for drawing text
- getSelectionAnimationDuration() - Method in class com.addisonelliott.segmentedbutton.SegmentedButtonGroup
-
Return the duration, in milliseconds, it takes to complete the animation to change selected button
- getSelectionAnimationInterpolator() - Method in class com.addisonelliott.segmentedbutton.SegmentedButtonGroup
-
Return the current animation interpolator used when animating button movement
This will return null if no animation is being used
- getText() - Method in class com.addisonelliott.segmentedbutton.SegmentedButton
-
Return the text currently being displayed
If no text is being shown, this will be either null or an empty string
- getTextColor() - Method in class com.addisonelliott.segmentedbutton.SegmentedButton
-
Returns the text color when the button is not selected
- getTextSize() - Method in class com.addisonelliott.segmentedbutton.SegmentedButton
-
Return the size of the text in pixels
- getTextTypeface() - Method in class com.addisonelliott.segmentedbutton.SegmentedButton
-
Return the current typeface used for drawing text
- SegmentedButton - Class in com.addisonelliott.segmentedbutton
-
- SegmentedButton(Context) - Constructor for class com.addisonelliott.segmentedbutton.SegmentedButton
-
- SegmentedButton(Context, AttributeSet) - Constructor for class com.addisonelliott.segmentedbutton.SegmentedButton
-
- SegmentedButton(Context, AttributeSet, int) - Constructor for class com.addisonelliott.segmentedbutton.SegmentedButton
-
- SegmentedButton.OnVisibilityChangedListener - Interface in com.addisonelliott.segmentedbutton
-
Interface definition for a callback that will be invoked when the visibility of the button changes
This is an internal listener meant to be used ONLY by the SegmentedButtonGroup
- SegmentedButtonGroup - Class in com.addisonelliott.segmentedbutton
-
- SegmentedButtonGroup(Context) - Constructor for class com.addisonelliott.segmentedbutton.SegmentedButtonGroup
-
- SegmentedButtonGroup(Context, AttributeSet) - Constructor for class com.addisonelliott.segmentedbutton.SegmentedButtonGroup
-
- SegmentedButtonGroup(Context, AttributeSet, int) - Constructor for class com.addisonelliott.segmentedbutton.SegmentedButtonGroup
-
- SegmentedButtonGroup(Context, AttributeSet, int, int) - Constructor for class com.addisonelliott.segmentedbutton.SegmentedButtonGroup
-
- SegmentedButtonGroup.AnimationInterpolator - Annotation Type in com.addisonelliott.segmentedbutton
-
- SegmentedButtonGroup.OnPositionChangedListener - Interface in com.addisonelliott.segmentedbutton
-
Interface definition for a callback that will be invoked when the position of the selection button changes
This callback will be called AFTER the animation is complete since the position does not change until the
completion of the animation.
- setBackground(Drawable) - Method in class com.addisonelliott.segmentedbutton.SegmentedButton
-
Set the background displayed when not selected to a given drawable
- setBackground(int) - Method in class com.addisonelliott.segmentedbutton.SegmentedButton
-
Set the background displayed when not selected to a given color
This will create a ColorDrawable or modify the current background if it is a ColorDrawable
- setBackground(Drawable) - Method in class com.addisonelliott.segmentedbutton.SegmentedButtonGroup
-
Set the background displayed when a button is not selected to a given drawable for each button
Note: This is a convenience function that sets the background for each individual button.
- setBackground(int) - Method in class com.addisonelliott.segmentedbutton.SegmentedButtonGroup
-
Set the background to be a solid color when a button is not selected for each button
This will create a ColorDrawable or modify the current background if it is a ColorDrawable.
- setBackgroundColor(int) - Method in class com.addisonelliott.segmentedbutton.SegmentedButton
-
Convenience function for setting the background color when not selected
This function already exists in the base View class so it is overridden to prevent confusion as to why
setBackground works but not setBackgroundColor.
- setBackgroundColor(int) - Method in class com.addisonelliott.segmentedbutton.SegmentedButtonGroup
-
Convenience function for setting the background color
This function already exists in the base View class so it is overridden to prevent confusion as to why
setBackground works but not setBackgroundColor.
- setBorder(int, int, int, int) - Method in class com.addisonelliott.segmentedbutton.SegmentedButtonGroup
-
Set the border for the perimeter of the button group.
- setDivider(Drawable, int, int, int) - Method in class com.addisonelliott.segmentedbutton.SegmentedButtonGroup
-
Set drawable as divider between buttons with a specified width, corner radius and padding
If the drawable is null, then the divider will be removed and hidden
- setDivider(int, int, int, int) - Method in class com.addisonelliott.segmentedbutton.SegmentedButtonGroup
-
Set divider between buttons with a specified solid color, width, radius and padding
- setDraggable(boolean) - Method in class com.addisonelliott.segmentedbutton.SegmentedButtonGroup
-
Sets whether or not the currently selected button can be moved via dragging
If true, the user can drag their finger starting from the selected button to a different button and the
selected button will follow the users finger.
- setDrawable(Drawable) - Method in class com.addisonelliott.segmentedbutton.SegmentedButton
-
Set the drawable for the button
If drawable is null, then the drawable is removed from the button
- setDrawableGravity(int) - Method in class com.addisonelliott.segmentedbutton.SegmentedButton
-
Set the drawable gravity
Can be one of the following values:
- Gravity.LEFT
- Gravity.TOP
- Gravity.RIGHT
- Gravity.BOTTOM
The drawable gravity indicates the location of the drawable in relation to the text.
- setDrawableHeight(int) - Method in class com.addisonelliott.segmentedbutton.SegmentedButton
-
Set the drawable height in pixels
If the height is -1, then the drawable height will be removed and the intrinsic drawable height will be used
instead
- setDrawablePadding(int) - Method in class com.addisonelliott.segmentedbutton.SegmentedButton
-
Set the drawable padding
The drawable padding is the space between the drawable and text, in pixels.
- setDrawableTint(int) - Method in class com.addisonelliott.segmentedbutton.SegmentedButton
-
Set the drawable tint color to the specified color
This drawable tint color will be the color applied to the drawable when the button is not selected
- setDrawableWidth(int) - Method in class com.addisonelliott.segmentedbutton.SegmentedButton
-
Set the drawable width in pixels
If the width is -1, then the drawable width will be removed and the intrinsic drawable width will be used
instead
- setOnPositionChangedListener(SegmentedButtonGroup.OnPositionChangedListener) - Method in class com.addisonelliott.segmentedbutton.SegmentedButtonGroup
-
Sets the listeners used for notifying position changes
- setPosition(int, boolean) - Method in class com.addisonelliott.segmentedbutton.SegmentedButtonGroup
-
Selects the button at the given position and animates the movement if desired
If the given position is out of bounds, i.e.
- setRadius(int) - Method in class com.addisonelliott.segmentedbutton.SegmentedButtonGroup
-
Set the radius of this button group
- setRipple(int) - Method in class com.addisonelliott.segmentedbutton.SegmentedButton
-
Set ripple color used for ripple effect on button press
- setRipple(boolean) - Method in class com.addisonelliott.segmentedbutton.SegmentedButtonGroup
-
Set ripple effect to be either enabled or disabled on button press
If enabled, then the ripple color used will be the last ripple color set for the buttons or the default value
of gray
- setRipple(int) - Method in class com.addisonelliott.segmentedbutton.SegmentedButtonGroup
-
Set ripple color used for ripple effect on button press
This will automatically enable the ripple effect for all buttons if it is already disabled.
- setRounded(boolean) - Method in class com.addisonelliott.segmentedbutton.SegmentedButton
-
Sets whether button is rounded regardless of its position in group
Note: You must manually call setupBackgroundClipPath after all changes to background radius, leftButton,
rightButton, rounded & width/height are completed.
- setSelectedBackground(Drawable) - Method in class com.addisonelliott.segmentedbutton.SegmentedButton
-
Set the background displayed when selected to a given drawable
- setSelectedBackground(int) - Method in class com.addisonelliott.segmentedbutton.SegmentedButton
-
Set the background displayed when selected to a given color
This will create a ColorDrawable or modify the current background if it is a ColorDrawable
- setSelectedBackground(Drawable) - Method in class com.addisonelliott.segmentedbutton.SegmentedButtonGroup
-
Set the background displayed when a button is selected to a given drawable for each button
Note: This is a convenience function that sets the background for each individual button.
- setSelectedBackground(int) - Method in class com.addisonelliott.segmentedbutton.SegmentedButtonGroup
-
Set the background to be a solid color when a button is selected for each button
This will create a ColorDrawable or modify the current background if it is a ColorDrawable.
- setSelectedBackgroundColor(int) - Method in class com.addisonelliott.segmentedbutton.SegmentedButton
-
Convenience function for setting the background color when selected
- setSelectedBackgroundColor(int) - Method in class com.addisonelliott.segmentedbutton.SegmentedButtonGroup
-
Convenience function for setting the background color
- setSelectedBorder(int, int, int, int) - Method in class com.addisonelliott.segmentedbutton.SegmentedButtonGroup
-
Set the border for the selected button.
- setSelectedButtonRadius(int) - Method in class com.addisonelliott.segmentedbutton.SegmentedButtonGroup
-
Sets the corner radius for the selected button
- setSelectedDrawableTint(int) - Method in class com.addisonelliott.segmentedbutton.SegmentedButton
-
Set the drawable tint color to the specified color
This drawable tint color will be the color applied to the drawable when the button is selected
- setSelectedTextColor(int) - Method in class com.addisonelliott.segmentedbutton.SegmentedButton
-
Set the text color when the button is selected
- setSelectedTextTypeface(Typeface) - Method in class com.addisonelliott.segmentedbutton.SegmentedButton
-
Set a new typeface to use for drawing text when the button is selected
- setSelectionAnimationDuration(int) - Method in class com.addisonelliott.segmentedbutton.SegmentedButtonGroup
-
Set the duration for animating changing the selected button
- setSelectionAnimationInterpolator(Interpolator) - Method in class com.addisonelliott.segmentedbutton.SegmentedButtonGroup
-
Set the current animation interpolator used when animating button movement
If interpolator is null, no animation will be used
- setSelectionAnimationInterpolator(int) - Method in class com.addisonelliott.segmentedbutton.SegmentedButtonGroup
-
Set the current animation interpolator used when animating button movement
The interpolator given must be one of the predefined Android interpolators
- setText(String) - Method in class com.addisonelliott.segmentedbutton.SegmentedButton
-
Set the text to a new string
If the string is null or an empty string, then the text will be hidden
- setTextColor(int) - Method in class com.addisonelliott.segmentedbutton.SegmentedButton
-
Set the text color when the button is unselected
- setTextSize(float) - Method in class com.addisonelliott.segmentedbutton.SegmentedButton
-
Set the size of the text in pixels
- setTextTypeface(Typeface) - Method in class com.addisonelliott.segmentedbutton.SegmentedButton
-
Set a new typeface to use for drawing text
- setVisibility(int) - Method in class com.addisonelliott.segmentedbutton.SegmentedButton
-