Android Open Source - treedo Item Decorator






From Project

Back to project page treedo.

License

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.

Java Source Code

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);
        }
    }
}




Java Source Code List

com.mbonnin.treedo.ApplicationTest.java
com.mbonnin.treedo.BackupAdapter.java
com.mbonnin.treedo.BackupManager.java
com.mbonnin.treedo.Database.java
com.mbonnin.treedo.DialogBuilder.java
com.mbonnin.treedo.ItemAdapter.java
com.mbonnin.treedo.ItemDecorator.java
com.mbonnin.treedo.ItemEditText.java
com.mbonnin.treedo.ItemListView.java
com.mbonnin.treedo.ItemView2.java
com.mbonnin.treedo.ItemView.java
com.mbonnin.treedo.Item.java
com.mbonnin.treedo.MainActivity.java
com.mbonnin.treedo.ObservableScrollView.java
com.mbonnin.treedo.ProgressBar.java
com.mbonnin.treedo.SpacerView.java
com.mbonnin.treedo.TypeSpinnerAdapter.java
com.mbonnin.treedo.Utils.java