hi,
 i was reviewing the notepad application available bundled as a sample
application in the sdk and in the customized EditText i was trying to
achieve drawing lines on the whole screen by replacing the following
code snippet:

        @Override
        protected void onDraw(Canvas canvas) {
            int count = getLineCount();
            Rect r = mRect;
            Paint paint = mPaint;

            for (int i = 0; i < getLineCount(); i++) {
                int baseline = getLineBounds(i, r);

                canvas.drawLine(r.left, baseline + 1, r.right,
baseline + 1, paint);
            }

            super.onDraw(canvas);
        }

with this:

        @Override
        protected void onDraw(Canvas canvas) {
            int count = getLineCount();
            Rect r = mRect;
            Paint paint = mPaint;

            int lineBounds = 23;
            int singleLineBounds = 21;

            for (int i = 0; i < 5; i++) {
                int baseline = lineBounds;

                canvas.drawLine(r.left, baseline + 1, r.right,
baseline + 1, paint);
                lineBounds += singleLineBounds;
            }

            super.onDraw(canvas);
        }

The first code snippet would print the line if there was actually data
in those lines and what im trying to do is to print those lines in the
whole EditText view no matter how many lines we have and it seems not
to be working at all, is there any work around for this ?
Thanks.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to