From c639c0f39f9f8d4fab022dc4db7b0ede84c2513b Mon Sep 17 00:00:00 2001 From: "Sumeet.Lubal" Date: Wed, 18 Oct 2017 13:44:41 +0530 Subject: [PATCH] Fix for issue 403: rippleColor is also used in support library which causes problem when using two libraries together --- .../main/java/com/gc/materialdesign/views/ButtonFloat.java | 4 ++-- .../main/java/com/gc/materialdesign/views/LayoutRipple.java | 4 ++-- .../MaterialDesign/src/main/res/values/attributes.xml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/MaterialDesignLibrary/MaterialDesign/src/main/java/com/gc/materialdesign/views/ButtonFloat.java b/MaterialDesignLibrary/MaterialDesign/src/main/java/com/gc/materialdesign/views/ButtonFloat.java index b4970b9..34ca25a 100644 --- a/MaterialDesignLibrary/MaterialDesign/src/main/java/com/gc/materialdesign/views/ButtonFloat.java +++ b/MaterialDesignLibrary/MaterialDesign/src/main/java/com/gc/materialdesign/views/ButtonFloat.java @@ -88,12 +88,12 @@ protected void setAttributes(AttributeSet attrs){ // Set Ripple Color // Color by resource int rippleColor = attrs.getAttributeResourceValue(MATERIALDESIGNXML, - "rippleColor", -1); + "rippleColor2", -1); if (rippleColor != -1) { setRippleColor(getResources().getColor(rippleColor)); } else { // Color by hexadecimal - int background = attrs.getAttributeIntValue(MATERIALDESIGNXML, "rippleColor", -1); + int background = attrs.getAttributeIntValue(MATERIALDESIGNXML, "rippleColor2", -1); if (background != -1) setRippleColor(background); else diff --git a/MaterialDesignLibrary/MaterialDesign/src/main/java/com/gc/materialdesign/views/LayoutRipple.java b/MaterialDesignLibrary/MaterialDesign/src/main/java/com/gc/materialdesign/views/LayoutRipple.java index bc27f3b..24c21b7 100644 --- a/MaterialDesignLibrary/MaterialDesign/src/main/java/com/gc/materialdesign/views/LayoutRipple.java +++ b/MaterialDesignLibrary/MaterialDesign/src/main/java/com/gc/materialdesign/views/LayoutRipple.java @@ -48,12 +48,12 @@ protected void setAttributes(AttributeSet attrs) { // Set Ripple Color // Color by resource int rippleColor = attrs.getAttributeResourceValue(MATERIALDESIGNXML, - "rippleColor", -1); + "rippleColor2", -1); if (rippleColor != -1) { setRippleColor(getResources().getColor(rippleColor)); } else { // Color by hexadecimal - int background = attrs.getAttributeIntValue(MATERIALDESIGNXML, "rippleColor", -1); + int background = attrs.getAttributeIntValue(MATERIALDESIGNXML, "rippleColor2", -1); if (background != -1) setRippleColor(background); else diff --git a/MaterialDesignLibrary/MaterialDesign/src/main/res/values/attributes.xml b/MaterialDesignLibrary/MaterialDesign/src/main/res/values/attributes.xml index 95a6502..012320f 100644 --- a/MaterialDesignLibrary/MaterialDesign/src/main/res/values/attributes.xml +++ b/MaterialDesignLibrary/MaterialDesign/src/main/res/values/attributes.xml @@ -4,7 +4,7 @@ - +