<span style= "font-family:arial, Helvetica, Sans-serif;" ><?xml version= "1.0" encoding= "Utf-8"?> </span>
<linearlayout xmlns:android= "http://schemas.android.com/apk/res/android" android:layout_width= "Fill_ Parent " android:layout_height=" fill_parent " > <!--Note Name--- < Com.marine.study.LineEditText android:id= "@+id/myedit" android:layout_width= "Fill_parent" android: layout_height= "Wrap_content" style= "?Android:attr/textviewstyle " android:background=" @null " android:textcolor=" @null " /> < /linearlayout>
Background, can be set into other colors, etc.
TextColor not necessarily null, can set font color
Add underline
public class Lineedittext extends EditText { //brushes are used to draw the underlined private paint paint; Public Lineedittext (context context, AttributeSet Attrs) { Super (context, attrs); Paint = new paint (); Paint.setstyle (Paint.Style.STROKE); Paint.setcolor (color.red); Turn on anti-aliasing memory Paint.setantialias (TRUE); } @Override protected void OnDraw (canvas canvas) { super.ondraw (canvas); Gets the total number of rows int linecount = Getlinecount (); Get the height of each line int lineheight = Getlineheight (); Draw lines based on the number of rows for (int i = 0; i < LineCount; i++) { int liney = (i + 1) * lineheight; Canvas.drawline (0, Liney, This.getwidth (), Liney, Paint);}}}
android--Remove EditText border, add underline