可以自定义一个shape做editview的背景。要想只显示底边,用layer-list包住这个shape,然后做如下设置: <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item android:top="-2dp" android:right="-2dp" android:left="-2dp"> <shape> <solid android:color="@android:color/white"/> <stroke android:width="1dp" android:color="#【橙色】"/> </shape> </item> </layer-list> 具体原理及代码来源,参见如下网址:android使用shape stroke描边只保留底部
可以自定义一个shape做editview的背景。要想只显示底边,用layer-list包住这个shape,然后做如下设置:
具体原理及代码来源,参见如下网址:android使用shape stroke描边只保留底部