Skip to content

Commit

Permalink
use ContextCompat for backward compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Dean Wild committed Mar 17, 2016
1 parent e2e4eee commit dfce108
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -9,6 +9,7 @@
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.Shader;
import android.support.v4.content.ContextCompat;
import android.text.TextPaint;
import android.util.AttributeSet;
import android.view.View;
Expand Down Expand Up @@ -315,7 +316,7 @@ public void setTextSize(float textSize) {


public void setEdgeEffectColorRes(int coloRes) {
setEdgeEffectColor(getContext().getColor(coloRes));
setEdgeEffectColor(ContextCompat.getColor(getContext(), coloRes));
}

public void setEdgeEffectColor(int edgeEffectColor) {
Expand Down

0 comments on commit dfce108

Please sign in to comment.