Unverified Commit 769fe754 authored by Next Mobile Development's avatar Next Mobile Development Committed by Jeffrey I. Schiller

Fix for missing ripple/touch effect on buttons

Fix for missing ripple/touch effect on buttons when color was
changed (#1184).

Change-Id: I92d922dc9e485cd2259315ea79faf98214a6bcad
parent 908c341f
......@@ -25,6 +25,7 @@ import android.graphics.drawable.ShapeDrawable;
import android.graphics.drawable.shapes.OvalShape;
import android.graphics.drawable.shapes.RectShape;
import android.graphics.drawable.shapes.RoundRectShape;
import android.graphics.PorterDuff;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
......@@ -373,8 +374,10 @@ public abstract class ButtonBase extends AndroidViewComponent
} else {
// Clear the background image.
ViewUtil.setBackgroundDrawable(view, null);
// Set to the specified color (possibly COLOR_NONE for transparent).
TextViewUtil.setBackgroundColor(view, backgroundColor);
//Now we set again the default drawable
ViewUtil.setBackgroundDrawable(view, defaultButtonDrawable);
//@Author NMD (Next Mobile Development) [nmdofficialhelp@gmail.com]
view.getBackground().setColorFilter(backgroundColor, PorterDuff.Mode.SRC_ATOP);
}
} else {
// If there is no background image and the shape is something other than default,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment