在android中,往往EditText需要去除下划线来满足UI需求,那么怎么来实现呢?
看图
接下来是xml布局中的代码:
<EditText
android:phoneNumber="true"
android:id="@+id/number"
android:layout_marginLeft="15dp"
android:textSize="20sp"
android:background="@null"
style="?android:attr/textViewStyle"
android:hint="用户名/工号"
android:layout_width="match_parent"
android:layout_height="match_parent" />
重点是这个↓
android:background="@null"
加上这个就可以搞定了,不妨可以试试!