Back to project page treedo.
The source code is released under:
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004 Everyone is permitted to copy and distribute verbatim or modified copies of this license document, ...
If you think the Android project treedo listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.mbonnin.treedo; //from ww w . j a v a 2s . c o m import android.graphics.Canvas; import android.graphics.Paint; import android.support.v7.widget.RecyclerView; import android.view.View; /** * Created by martin on 1/3/15. */ public class ItemDecorator extends RecyclerView.ItemDecoration { public void onDrawOver (Canvas c, RecyclerView parent, RecyclerView.State state) { Paint p = new Paint(); p.setColor(parent.getResources().getColor(R.color.black_26)); p.setStyle(Paint.Style.FILL); for (int i = 0; i < parent.getChildCount(); i++) { View child = parent.getChildAt(i); c.drawRect(0, child.getBottom() - Utils.toPixels(1f), c.getWidth(), child.getBottom(), p); } } }