Clover Coverage Report - SaveApp Coverage Report
Coverage timestamp: mar dic 23 2014 15:53:11 EST
../../../../img/srcFileCovDistChart0.png 77% of files have more coverage
12   41   3   6
2   28   0,25   2
2     1,5  
1    
This report was generated with an evaluation server license. Purchase Clover or configure your license.
 
  NoteEditText       Line # 13 12 3 0% 0.0
 
No Tests
 
1    package com.loopback.androidapps.saveapp;
2   
3    import android.content.Context;
4    import android.graphics.Canvas;
5    import android.graphics.Paint;
6    import android.graphics.Rect;
7    import android.util.AttributeSet;
8    import android.widget.EditText;
9   
10    /**
11    * A custom EditText that draws lines between each line of text that is displayed.
12    */
 
13    public class NoteEditText extends EditText {
14    private Rect mRect;
15    private Paint mPaint;
16   
17    // we need this constructor for LayoutInflater
 
18  0 toggle public NoteEditText(Context context, AttributeSet attrs) {
19  0 super(context, attrs);
20   
21  0 mRect = new Rect();
22  0 mPaint = new Paint();
23  0 mPaint.setStyle(Paint.Style.STROKE);
24  0 mPaint.setColor(0x800000FF);
25    }
26   
 
27  0 toggle @Override
28    protected void onDraw(Canvas canvas) {
29  0 int count = getLineCount();
30  0 Rect r = mRect;
31  0 Paint paint = mPaint;
32   
33  0 for (int i = 0; i < count; i++) {
34  0 int baseline = getLineBounds(i, r);
35   
36  0 canvas.drawLine(r.left, baseline + 1, r.right, baseline + 1, paint);
37    }
38   
39  0 super.onDraw(canvas);
40    }
41    }