2017-06-17 83 views
2

enter image description here如何合并两个形状在一个梯度的Android

如何合并边框或单梯度both.how到可能吗?

已经尝试过这样的背景形状如下: - shape.xml

<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> 
<item 
    android:top="175dp"> 
    <shape android:shape="oval"> 
     <gradient 
      android:angle="135" 
      android:startColor="#f56f2c" 
      android:endColor="#fa9f46"/> 

    </shape> 

</item> 
<item 
    android:bottom="40dp" 
    > 
    <shape android:shape="rectangle"> 
     <gradient 
      android:angle="135" 
      android:startColor="#f56f2c" 
      android:endColor="#fa9f46"/> 
    </shape> 
</item> 
</layer-list> 

回答

1

我解决了这个问题...的倾斜角度变化,以90。不论是保持颜色变化项目共同边界固定为每个边界相同的颜色。