Skip to content

Commit 3246039

Browse files
committed
Merge pull request #15 from matthewrice345/master
Adds ability to use Color.TRANSPARENT for the divider color.
2 parents 7dae546 + 2683cbb commit 3246039

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/src/main/java/com/yalantis/contextmenu/lib/MenuObject.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public class MenuObject implements Parcelable {
2525
// text
2626
private int mTextColor;
2727
// divider
28-
private int mDividerColor;
28+
private int mDividerColor = Integer.MAX_VALUE;
2929

3030
private int mMenuTextAppearenseStyle;
3131

lib/src/main/java/com/yalantis/contextmenu/lib/Utils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public static View getDivider(Context context, MenuObject menuItem) {
7777
viewLayoutParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
7878
dividerView.setLayoutParams(viewLayoutParams);
7979
dividerView.setClickable(true);
80-
int dividerColor = menuItem.getDividerColor() == 0 ?
80+
int dividerColor = menuItem.getDividerColor() == Integer.MAX_VALUE ?
8181
context.getResources().getColor(R.color.divider_color) :
8282
menuItem.getDividerColor();
8383
dividerView.setBackgroundColor(dividerColor);

0 commit comments

Comments
 (0)