如何为形状添加高程?

问题描述 投票:0回答:1

现在我有下一个矩形:

<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">

    <corners android:radius="28dp" />

    <gradient
        android:endColor="#FFFFFF"
        android:gradientRadius="20dp"
        android:startColor="#FFFFFF"
        android:type="linear" />

    <size
        android:width="106dp"
        android:height="106dp" />

    <stroke
        android:width="1dp"
        android:color="#0189ff" />
</shape>

还有下一个结果:

enter image description here

问:如何添加阴影/高程而不是笔划?

android xml shapes android-elevation
1个回答
0
投票

您不能直接在阴影处应用阴影。

© www.soinside.com 2019 - 2024. All rights reserved.