in shimmer/src/main/java/com/facebook/shimmer/ShimmerFrameLayout.java [60:80]
private void init(Context context, @Nullable AttributeSet attrs) {
setWillNotDraw(false);
mShimmerDrawable.setCallback(this);
if (attrs == null) {
setShimmer(new Shimmer.AlphaHighlightBuilder().build());
return;
}
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.ShimmerFrameLayout, 0, 0);
try {
Shimmer.Builder shimmerBuilder =
a.hasValue(R.styleable.ShimmerFrameLayout_shimmer_colored)
&& a.getBoolean(R.styleable.ShimmerFrameLayout_shimmer_colored, false)
? new Shimmer.ColorHighlightBuilder()
: new Shimmer.AlphaHighlightBuilder();
setShimmer(shimmerBuilder.consumeAttributes(a).build());
} finally {
a.recycle();
}
}