Skip to content

Commit

Permalink
add color getter to ComparableColorDrawable
Browse files Browse the repository at this point in the history
Summary: ComparableColorDrawable didn't have a way to read it's color. This diff adds a getter method `getColor` to it.

Reviewed By: muraziz

Differential Revision: D15469092

fbshipit-source-id: fb8ab03688e2ea3e4cd073437a8817b29fcd0416
  • Loading branch information
danielbuechele authored and facebook-github-bot committed May 24, 2019
1 parent cbf5b98 commit 513cf91
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ public boolean isEquivalentTo(ComparableDrawable other) {
return mColor == ((ComparableColorDrawable) other).mColor;
}

public @ColorInt int getColor() {
return mColor;
}

public static ComparableColorDrawable create(@ColorInt int color) {
return new ComparableColorDrawable(color);
}
Expand Down

0 comments on commit 513cf91

Please sign in to comment.