use of carbon.internal.DefaultItemAnimator in project Carbon by ZieIony.
the class ExpandableRecyclerView method initRecycler.
private void initRecycler(AttributeSet attrs, int defStyleAttr) {
TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.RecyclerView, defStyleAttr, R.style.carbon_RecyclerView);
for (int i = 0; i < a.getIndexCount(); i++) {
int attr = a.getIndex(i);
if (attr == R.styleable.RecyclerView_carbon_overScroll) {
setOverScrollMode(a.getInt(attr, ViewCompat.OVER_SCROLL_ALWAYS));
} else if (attr == R.styleable.RecyclerView_carbon_headerTint) {
setHeaderTint(a.getColor(attr, 0));
} else if (attr == R.styleable.RecyclerView_carbon_headerMinHeight) {
setHeaderMinHeight((int) a.getDimension(attr, 0.0f));
} else if (attr == R.styleable.RecyclerView_carbon_headerParallax) {
setHeaderParallax(a.getFloat(attr, 0.0f));
} else if (attr == R.styleable.RecyclerView_android_divider) {
Drawable drawable = a.getDrawable(attr);
float height = a.getDimension(R.styleable.RecyclerView_android_dividerHeight, 0);
if (drawable != null && height > 0)
setDivider(drawable, (int) height);
}
}
Carbon.initTint(this, a, tintIds);
a.recycle();
setClipToPadding(false);
setItemAnimator(new DefaultItemAnimator());
setWillNotDraw(false);
}
Aggregations