当使用layer-list布局,产生下划线的时候,如果TextView 设置了singleline=“true”,则会导致线少了1px。
布局如:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<!-- This is the line -->
<item>
<shape>
<solid android:color="#80000000" />
</shape>
</item>
<!-- This is the main color -->
<item android:bottom="1px">
<shape>
<solid android:color="#FFFFFFFF" />
</shape>
</item>
</layer-list>