我正在下面的代码,使形状看起来像下面的图像,是否可以通过只有图层列表概念进行下面的截图?
我尝试过什么?
这是我的代码:
<item>
<shape android:shape="rectangle" >
<solid android:color="#00f" />
<padding android:bottom="2dp" />
</shape>
</item>
<item android:bottom="10dp">
<shape android:shape="rectangle" >
<solid android:color="#fff" />
<padding
android:left="2dp"
android:right="2dp" />
</shape>
</item>
<item>
<shape android:shape="rectangle" >
<solid android:color="#fff" />
</shape>
</item>
<item>
<shape>
<!-- set the shadow color here -->
<stroke
android:width="2dp"
android:color="@color/generic_shadow_color" />
<!-- setting the thickness of shadow (positive value will give shadow on that side) -->
<padding
android:bottom="2dp"
android:left="-1dp"
android:right="2dp"
android:top="-1dp" />
<corners android:radius="7dp" />
</shape>
</item>
<!-- Background -->
<item>
<shape>
<solid android:color="@color/generic_shadow_color" />
<corners android:radius="7dp" />
</shape>
</item>
我想要的结果形状是: