2017-06-17 84 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。不論是保持顏色變化項目共同邊界固定爲每個邊界相同的顏色。