Skip to content

Commit

Permalink
Added methods to set color for disabled btn
Browse files Browse the repository at this point in the history
  • Loading branch information
nikartx committed Apr 25, 2019
1 parent f1e2b3b commit f97f245
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions button/src/main/java/com/github/nikartm/button/FitButton.kt
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,38 @@ class FitButton : LinearLayout {
return this
}

/**
* Get the disabled background and border color of the button
* @return disabled color [Int]
*/
fun getDisabledColor() : Int = manager!!.getButton().disableColor

/**
* Set the button disabled background and border color
* @param color [Int]
*/
fun setDisabledButtonColor(color: Int) : FitButton {
manager!!.getButton().disableColor = color
updateView()
return this
}

/**
* Get the disabled color of button elements
* @return disabled color [Int]
*/
fun getElementsDisabledColor() : Int = manager!!.getButton().elementsDisableColor

/**
* Set the disabled color of button elements
* @param color [Int]
*/
fun setElementsDisabledButtonColor(color: Int) : FitButton {
manager!!.getButton().elementsDisableColor = color
updateView()
return this
}

/**
* Get the button corner radius
* @return button corner radius [Float]
Expand Down

0 comments on commit f97f245

Please sign in to comment.