Android xml45&xB0;效果叠加

Android xml45&xB0;效果叠加,android,xml,Android,Xml,我只是想在XML布局文件中直接创建一个简单的效果 正如你所看到的,我只想创建一个45°叠加效果。但我不能这么做。也许你能引导我走向正确的方向 圆形线性布局的代码(左侧): 半圆形布局 <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item> <shape android:shape="oval"> <solid android

我只是想在XML布局文件中直接创建一个简单的效果

正如你所看到的,我只想创建一个45°叠加效果。但我不能这么做。也许你能引导我走向正确的方向

圆形线性布局的代码(左侧):


半圆形布局

<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
    <shape android:shape="oval">
        <solid android:color="#393a3f"/>
    </shape>
</item>

<item android:top="1dp">
    <shape android:shape="oval">
        <solid android:color="#27262c"/>
    </shape>
</item>

<item android:top="2dp">
    <shape android:shape="oval">
        <gradient android:angle="45" android:startColor="#000000"  android:endColor="#000000"/>
    </shape>
</item>
</layer-list>

任何帮助都将不胜感激。
谢谢。

我认为这并不简单,至少在xml定制方面,我担心您无法在xml中实现这一点。在带有drawArc和drawLine的canvas对象上,这似乎更容易实现。与此相比,xml可绘制命令相对有限。感谢您的回复。所以我感觉没那么糟;)。加贝森也谢谢你。我试试这个。这是一个新的起点。
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
    <shape android:shape="oval">
        <solid android:color="#393a3f"/>
    </shape>
</item>

<item android:top="1dp">
    <shape android:shape="oval">
        <solid android:color="#27262c"/>
    </shape>
</item>

<item android:top="2dp">
    <shape android:shape="oval">
        <gradient android:angle="45" android:startColor="#000000"  android:endColor="#000000"/>
    </shape>
</item>
</layer-list>