From 38c0693cd70b725b491f309a41147bda2dbd3dc9 Mon Sep 17 00:00:00 2001 From: Usman Rana Date: Fri, 27 Sep 2019 19:25:55 +0500 Subject: [PATCH] made shimmer base color parsing correction --- .../java/com/ethanhua/skeleton/RecyclerViewSkeletonScreen.java | 2 +- .../src/main/java/com/ethanhua/skeleton/ViewSkeletonScreen.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/library/src/main/java/com/ethanhua/skeleton/RecyclerViewSkeletonScreen.java b/library/src/main/java/com/ethanhua/skeleton/RecyclerViewSkeletonScreen.java index 711df97..7263a91 100644 --- a/library/src/main/java/com/ethanhua/skeleton/RecyclerViewSkeletonScreen.java +++ b/library/src/main/java/com/ethanhua/skeleton/RecyclerViewSkeletonScreen.java @@ -139,7 +139,7 @@ public Builder shimmerColored(boolean shimmerColored) { } public Builder shimmerBaseColor(@ColorRes int shimmerBaseColor) { - this.mShimmerBaseColor = shimmerBaseColor; + this.mShimmerBaseColor = ContextCompat.getColor(mRecyclerView.getContext(), shimmerBaseColor); return this; } diff --git a/library/src/main/java/com/ethanhua/skeleton/ViewSkeletonScreen.java b/library/src/main/java/com/ethanhua/skeleton/ViewSkeletonScreen.java index 2918b0c..5960836 100644 --- a/library/src/main/java/com/ethanhua/skeleton/ViewSkeletonScreen.java +++ b/library/src/main/java/com/ethanhua/skeleton/ViewSkeletonScreen.java @@ -171,7 +171,7 @@ public ViewSkeletonScreen.Builder shimmerColored(boolean shimmerColored) { } public ViewSkeletonScreen.Builder shimmerBaseColor(@ColorRes int shimmerBaseColor) { - this.mShimmerBaseColor = shimmerBaseColor; + this.mShimmerBaseColor = ContextCompat.getColor(mView.getContext(), shimmerBaseColor); return this; }