我正在尝试创建一个底部栏,背景应该像这样:
我目前正在使用以下代码:
![enter image description here](https://istack.dev59.com/R6tQi.webp)
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<gradient android:endColor="#000000" android:startColor="#696969"
android:centerColor="#696969" android:angle="270" />
<stroke android:color="#696969" />
<padding android:left="2dp" android:top="3dp" android:right="2dp"
android:bottom="3dp" />
</shape>
</item>
</selector>
但是输出结果看起来像这样...
如何获得这种双色背景?请建议...谢谢