Skip to content

Commit

Permalink
Added ability to set FloatingActionsMenu background color programmati…
Browse files Browse the repository at this point in the history
…cally. From zendesk#238
  • Loading branch information
bohsen committed Nov 9, 2017
1 parent 7296775 commit 38ea712
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,16 @@ public void draw(Canvas canvas) {
}
}

public void setColorNormalResId(@ColorRes int resId) {
mAddButtonColorNormal=getColor(resId);
mAddButton.setColorNormal(mAddButtonColorNormal);
}

public void setColorPressedResId(@ColorRes int resId) {
mAddButtonColorPressed=getColor(resId);
mAddButton.setColorPressed(mAddButtonColorPressed);
}

private void createAddButton(final Context context) {
if (mAddButtonIcon != 0) {
mAddButton = new FloatingActionButton(context) {
Expand Down

0 comments on commit 38ea712

Please sign in to comment.