如果使用alignParentTop,Android阴影将不起作用

如果使用alignParentTop,Android阴影将不起作用,android,shadow,elevation,android-elevation,Android,Shadow,Elevation,Android Elevation,我使用此代码和阴影效果很好: <carbon.widget.LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_alignParentRight="true" android:layo

我使用此代码和阴影效果很好:

<carbon.widget.LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_alignParentRight="true"
        android:layout_marginLeft="12dp"
        android:layout_marginTop="12dp"
        android:layout_marginRight="12dp"
        android:layout_marginBottom="120dp"
        android:background="@color/colorBgWhite"
        android:clickable="false"
        android:gravity="center|right|center_horizontal"
        app:carbon_cornerRadius="10dp"
        app:carbon_elevation="2.5dp"
        app:carbon_elevationShadowColor="@color/colorShadow">

如果我将
android:layout\u alignParentBottom=“true”
更改为
android:layout\u alignParentTop=“true”
,阴影将无法工作

顶部屏幕上的所有阴影不工作,但底部工作正常:|

样本: