I am trying to draw some lines on the background of an EditText.
I subclassed EditText, and included the fully qualified package name in my xml layout, replacing the previous EditText declaration.
Then I implemented onDraw(); but what is happening is that onDraw just seems to get called over and over again in an infinite loop.
I thought maybe I was launching an infinite recursion, so I commented everything out except for a log message, and it is still occurring.
What is going on here?
package myview;
import android.content.Context;
import android.graphics.Canvas;
import android.util.AttributeSet;
import android.util.Log;
import android.widget.EditText;
public class LinedEditView extends EditText {
public LinedEditView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public LinedEditView(Context context) {
super(context);
}
public LinedEditView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
@Override
/////// KEEPS GETTING CALLED !!!!!!??????? ////////////
protected void onDraw(Canvas canvas) {
Log.d("LinedEditView", "Calling onDraw()");
super.onDraw(canvas);
}
}