我想问一下如何更改 EditText 边框,然后将其置于焦点上。我想将原来的橙色渐变更改为我自己的。
最佳答案
您好,您可以在 drawable 文件夹中创建这样的渐变。
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<gradient
android:startColor="#5a5a5a88"
android:endColor="#14141488"
android:angle="270" android:centerX="0.25"/>
</shape>
</item>
<item android:top="80dp">
<shape android:shape="rectangle">
<gradient
android:startColor="#5aff5a88"
android:endColor="#14ff1488"
android:angle="270" android:centerX="0.25"/>
</shape>
关于android - 更改 EditText 焦点边框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11863658/