Android 如何创建此自定义阴影?
我正在尝试创建以下内容: 屏幕截图显示了一个看起来像卡片的UI元素,它下面有一个弯曲的阴影。我不确定创建阴影的最佳方法是什么。如果有人已经实现了类似的东西,您的洞察力将不胜感激 以下是初步布局:Android 如何创建此自定义阴影?,android,android-layout,Android,Android Layout,我正在尝试创建以下内容: 屏幕截图显示了一个看起来像卡片的UI元素,它下面有一个弯曲的阴影。我不确定创建阴影的最佳方法是什么。如果有人已经实现了类似的东西,您的洞察力将不胜感激 以下是初步布局: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/wrapper" android:layout_width="match_parent" android:lay
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/wrapper"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<RelativeLayout
android:id="@+id/card"
style="@style/card"> <!-- contains the card drawable -->
<TextView
android:text="Text and images go here" />
</RelativeLayout>
<ImageView
android:background="card_shadow" />
你打算怎么做?阴影是否可以包含在可提取的卡片中
谢谢。我使用的RelativeLayout包含带填充的RelativeLayout。内部布局包含实际视图和以下背景: 或针对轻主题:
我认为9补丁在这里可以正常工作:
Woops@迈克尔在那里打败了我。