Skip to content

Commit

Permalink
Merge pull request #15 from matthewrice345/master
Browse files Browse the repository at this point in the history
Adds ability to use Color.TRANSPARENT for the divider color.
  • Loading branch information
alexzaitsev committed Apr 24, 2015
2 parents 7dae546 + 2683cbb commit 3246039
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class MenuObject implements Parcelable {
// text
private int mTextColor;
// divider
private int mDividerColor;
private int mDividerColor = Integer.MAX_VALUE;

private int mMenuTextAppearenseStyle;

Expand Down
2 changes: 1 addition & 1 deletion lib/src/main/java/com/yalantis/contextmenu/lib/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public static View getDivider(Context context, MenuObject menuItem) {
viewLayoutParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
dividerView.setLayoutParams(viewLayoutParams);
dividerView.setClickable(true);
int dividerColor = menuItem.getDividerColor() == 0 ?
int dividerColor = menuItem.getDividerColor() == Integer.MAX_VALUE ?
context.getResources().getColor(R.color.divider_color) :
menuItem.getDividerColor();
dividerView.setBackgroundColor(dividerColor);
Expand Down

0 comments on commit 3246039

Please sign in to comment.