2
我有一個TextView,並且我想沿着它的頂部和底部邊緣添加具有不同顏色的邊框。我知道,序沿着所有的邊緣,我們可以簡單地使用下面的代碼添加一種顏色的邊框:向Android視圖的頂部和底部邊緣添加不同顏色邊框的方法
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<solid android:color="#000000"/>
</shape>
</item>
<item
android:top="1dp" android:bottom="1dp">
<shape android:shape="rectangle">
<solid android:color="#ffffff"/>
</shape>
</item>
但需要,如果我們需要用不同的顏色的邊緣做什麼?
謝謝你工作得很好:) –