Android -- remove the EditText border and add underscores
The background can be set to other colors.
TextColor is not necessarily null. You can set the font color.
Underline
Public class LineEditText extends EditText {// Paint brush used to draw the underline private paint; public LineEditText (Context context, AttributeSet attrs) {super (context, attrs); Paint = new Paint (); paint. setStyle (Paint. style. STROKE); paint. setColor (Color. RED); // enable anti-sawtooth memory usage paint. setAntiAlias (true) ;}@ Override protected void onDraw (Canvas canvas) {super. onDraw (canvas); // get the total number of rows int lineCount = getLineCount (); // get the height of each line int lineHeight = getLineHeight (); // draw a line for (int I = 0; I <lineCount; I ++) {int lineY = (I + 1) * lineHeight; canvas. drawLine (0, lineY, this. getWidth (), lineY, paint );}}}