Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion likebutton/src/main/java/com/like/LikeButton.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import android.support.annotation.ColorRes;
import android.support.annotation.DrawableRes;
import android.support.v4.content.ContextCompat;
import android.support.v7.content.res.AppCompatResources;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.MotionEvent;
Expand Down Expand Up @@ -142,7 +143,7 @@ private void init(Context context, AttributeSet attrs, int defStyle) {
private Drawable getDrawableFromResource(TypedArray array, int styleableIndexId) {
int id = array.getResourceId(styleableIndexId, -1);

return (-1 != id) ? ContextCompat.getDrawable(getContext(), id) : null;
return (-1 != id) ? AppCompatResources.getDrawable(getContext(), id) : null;
}

/**
Expand Down